docker pull microsoft/mssql-server-linux
// Run the docker container with name catalogDB in port 1433 expose to outside
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=ProductApi(!)' -e 'MSSQL_PID=Express' -p 1433:1433 --name=catalogdb microsoft/mssql-server-linux
docker start catalogdb
Put the migrations under the Data folder
dotnet ef migrations add InitialMigration -o Data/Migrations
dotnet ef database update
Swashbuckle.AspNetCore
docker pull microsoft/aspnetcore:2.0.0
and docker pull microsoft/aspnetcore-build
install images from docker Hub.
in the directory of ProductCatalogApi docker build -t shoes/catalog .
docker rmi shoes/catalog
and clean the dependent images with name none docker system prune
docker-compose build
run where docker compose is placed.
docker-compose up mssqlserver
run the mssqlserver container.
docker-compose up catalog
run the catalog container.