Samples for developing and debugging .NET Core applications with Docker and Visual Studio Code.
Run from the src folder:
docker build --rm --pull -f src\WebApi\Dockerfile -t webapi .
docker build --rm --pull -f src\WebUI\Dockerfile -t webui .
For the Azure Artifacts demo, create and pass in the personal access token build argument, for example:
docker build --rm --pull -f src\WebApi\Dockerfile -t webapi --build-arg PAT=[YOUR PAT HERE] .
Create the container network in Docker:
docker network create demo-net
Be sure to choose the "Docker .NET Core Launch" VS Code debugging target in both WebApi and WebUI.
Example Docker run commands:
docker run -dt --name "webapi-dev" --network "demo-net" -e "NO_PROXY=.demo-net, .internal" -e "no_proxy=.demo-net, .internal" -e "ASPNETCORE_ENVIRONMENT=DevContainer" -e "ASPNETCORE_URLS=http://+:80" -p "5000:80" -p "44386:443" "webapi:latest"
docker run -dt --name "webui-dev" --network "demo-net" -e "NO_PROXY=.demo-net" -e "no_proxy=.demo-net" -e "ASPNETCORE_ENVIRONMENT=DevContainer" -e "ASPNETCORE_URLS=http://+:80" -p "5001:80" -p "44387:443" "webui:dev"