Skip to content

Instantly share code, notes, and snippets.

@JeremyNevill
Created February 13, 2017 14:08
Show Gist options
  • Select an option

  • Save JeremyNevill/c22a6b5dcae4e6a2597bd6f6065ade6a to your computer and use it in GitHub Desktop.

Select an option

Save JeremyNevill/c22a6b5dcae4e6a2597bd6f6065ade6a to your computer and use it in GitHub Desktop.
Running DotNet Core in Docker on the Mac

Running DotNet Core in Docker on the Mac

Firstly install Docker on the mac and make sure the following works:

docker run -d -p 80:80 --name webserver nginx

Then create your dotnet core app and from the code folder run the following command:

docker run -p 8000:80 -v $(pwd):/myapp -e "ASPNETCORE_URLS=http://+:80" -it --rm microsoft/dotnet:1.1-sdk-projectjson

Once the container is running...

cd myapp
dotnet restore
dotnet run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment