Skip to content

Instantly share code, notes, and snippets.

@gussiciliano
Created March 22, 2018 20:44
Show Gist options
  • Save gussiciliano/67fa32841e849826887a6cfd170fe70f to your computer and use it in GitHub Desktop.
Save gussiciliano/67fa32841e849826887a6cfd170fe70f to your computer and use it in GitHub Desktop.
FROM microsoft/dotnet:2.0-sdk
WORKDIR /app
EXPOSE 80
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy and build everything else
COPY . ./
RUN dotnet publish -c Release -o out
CMD ASPNETCORE_URLS=http://*:$PORT dotnet out/NetCoreProject.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment