Docker For Windows

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’

1
Set-Location -Path C:\Dev-Code-School\DockerDemo

Windows Containers

aspnet

  • 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\

iis

Linux Containers

mysql

  • 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.

postgresql

References