Skip to content

Instantly share code, notes, and snippets.

@kyle-morton
Created August 15, 2020 19:51
Show Gist options
  • Save kyle-morton/c172331aa6bd1339d48e3dab9beecab6 to your computer and use it in GitHub Desktop.
Save kyle-morton/c172331aa6bd1339d48e3dab9beecab6 to your computer and use it in GitHub Desktop.
Development dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk
LABEL key="Kyle Morton"
ENV ASPNETCORE_URLS=http://*:5000
ENV DOTNET_USE_POLLING_FILE_WATCHER=1
ENV ASPNETCORE_ENVIRONMENT=development
WORKDIR /app
ENTRYPOINT ["/bin/bash", "-c", "dotnet restore && dotnet watch run"]
# build the image using:
# docker build -t [your-image-name] .
# run the image using:
# docker run -p 8080:5000 -v ${PWD}:/app [your-image-name]
# if you'd like to run in detached mode, add -d to the docker run command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment