Docker (original) (raw)
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env WORKDIR /app
Copy everything else and build
COPY . ./ RUN dotnet publish -c Release -o out
Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 WORKDIR /app COPY --from=build-env /app/src/WebApi/out . CMD export ASPNETCORE_URLS=http://*:$PORT && dotnet WebApi.dll
SQL Server
To spin up a SQL Server in a docker container using the connection string Server=localhost;User Id=sa;Password=<YourNewStrong!Passw0rd>; run the following command: