Download Docker for windows CE from https://www.docker.com/docker-windows
- Run the install, windows will re-boot a few times and install some updates.
- The linux VM lives here, C:\Users\Public\Documents\Hyper-V\Virtual hard disks\ ~ try not to upset it.
- Enable power shell commands
CD quickly to the location you clone the repository too, I saved this as ‘C:\Users\Carl\CD-CodeLocation.ps1’
Set-Location -Path C:\Dev-Code-School\DockerDemo
- NB – Switch docker for windows to run as ‘WINDOWS CONTAINERS’ from the system tray.
- Run \DockerDemo\Docker For Windows\windows containers\aspnet\build-container-aspnet.ps1
- The initial image pull WILL TAKE SOME TIME, ignore the initial container kill/rm fails on ‘aspnet-site’
- Open the given IP in your browser. The WEB API helpfile is shown from the projects ‘HelpPage’ area
- Source code for the sample API is here ~ \DockerDemo\Sample API Code\WebApi\
- Run \DockerDemo\Docker For Windows\windows containers\iis\build-container-iissite.ps1
- The initial image pull will take some time, ignore the initial container kill/rm fails on ‘iis-site’
- Open the given IP in your browser on Port 80, default IIS landing screen is shown
- Open the given IP in your browser on Port 81, content\index.htm is shown
- NB – Switch docker for windows to run as ‘LINUX CONTAINERS’ from the system tray.
- Run \DockerDemo\Docker For Windows\linux containers\mysql\create-container-mysql_p5.ps1
- Ignore the initial container kill/rm fails on ‘mysql_p5’
- Connect to the mysql_p5 container instance on 127.0.0.1:62005
- There are some fly scripts at \DockerDemo\linux\mysql\flyway
- ~ These can be added to the powershell script or run manually.
- Run \DockerDemo\Docker For Windows\linux containers\postgresql\create-container-postgres_p6.ps1
- Ignore the initial container kill/rm fails on ‘postgres_p6’
- Connect to the postgres_p6 container instance on 127.0.0.1:62006