Commit 0fc77319 authored by Mike Shoup's avatar Mike Shoup

Add dockerfiles for dotnet app

parent 59f96d6a
bin\
obj\
\ No newline at end of file
FROM microsoft/dotnet:2.1-sdk as build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY HelloApi/*.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY HelloApi/ ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM microsoft/dotnet:2.1-aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENV ASPNETCORE_URLS http://*:8000
ENTRYPOINT ["dotnet", "HelloApi.dll"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment