- Windows 10 Professional or Enterprise, Anniversary Update
- Visual Studio 2015
- Visual Studio Tools for Docker
- Docker for Windows
Open the solution in Visual Studio.
- Right-click the DotNetCore.Web project, located in the Demo 1 folder, and select Set as StartUp Project
- Ensure Docker is selected in the Debug option (list next to Solutions Platforms) and hit F5
- Eventually the app should launch in a browser, try the following
- Set a breakpoint and refresh to see it hit
- Edit a view and refresh to see the update, no need to stop debugging
- Right-click and Publish the DotNet46.Web project, choose the Local profile
- Open a command prompt in the solution directory and build your docker image
docker build -t demo2 .\DotNet46.Web-Published\.
- Run
docker images
to verify you have a new image demo2 (tag=latest) - Run
docker run --rm -p 80:9999 --name demo2 demo2
and navigate to http://(container ip):9999* to see the app- *Run
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" demo2
to get the container ip address
- *Run
- Open a command prompt in the solution directory and build your docker image
docker build -t demo3 .\src\DotNet46.Console\.
- Run
docker images
to verify you have a new image demo3 (tag=latest) - Run
docker run --rm demo3
and wait for the first 15 numbers of the Fibonacci series to be printed out - Try
docker run -e FIBONACCI_N=5 --rm demo3
to print only the first 5
- Right-click and Publish the CMS.Web project, choose the Local profile
- Open a command prompt in the solution directory and build your docker image
docker build -t demo4 .\CMS.Web-Published\.
- Run
docker images
to verify you have a new image demo4 (tag=latest) - Run
docker run --rm -p 80:9999 --name demo4 demo4
and navigate to http://(container ip):9999* to see the app- *Run
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" demo4
to get the container ip address
- *Run