adjust dockerfile again
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
FROM microsoft/dotnet:2.1.400-sdk-alpine3.7
|
||||
|
||||
COPY . /app
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN ["dotnet", "restore"]
|
||||
# copy csproj and restore as distinct layers
|
||||
COPY aka.terribledev.io.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
RUN ["dotnet", "build", "--configuration", "Release"]
|
||||
# copy everything else and build app
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
RUN 'ls'
|
||||
ENV ASPNETCORE_ENVIRONMENT Production
|
||||
ENV ASPNETCORE_URLS http://*:5000
|
||||
EXPOSE 5000/tcp
|
||||
|
||||
CMD ["dotnet", "run", "--configuration", "Release"]
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/out ./
|
||||
ENTRYPOINT ["dotnet", "aka.terribledev.io.dll"]
|
||||
Reference in New Issue
Block a user