First Initial
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
|
||||
WORKDIR /app
|
||||
|
||||
# Copy csproj and restore as distinct layers
|
||||
COPY *.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
# Copy everything else and build
|
||||
COPY . ./
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
ENV ASPNETCORE_ENVIRONMENT=Staging
|
||||
RUN ["dotnet","ef","database","update"]
|
||||
|
||||
# Build runtime image
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/out .
|
||||
COPY --from=build-env /app/tb320eva.xml .
|
||||
|
||||
ENTRYPOINT ["dotnet", "tb320eva.dll", "--environment=Staging"]
|
||||
Reference in New Issue
Block a user