adjust dockerfile again

This commit is contained in:
Tommy Parnell
2018-08-17 15:12:00 -04:00
parent 6012fa2620
commit d069417c09

View File

@@ -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"]