Sitecore running in a Windows Server Container - Part 2

Here you can find some tips and tricks I picked up while playing around with this awesome new Windows feature. You should also read Part 1 before this makes any sense :)

Host VM tweaks

  1. Copy ServerDatacenterCore_en-us_TP4_Container.vhd to ServerDatacenterCore_en-us_TP4_Container_Extended.vhd.
  2. Use the "Edit disk" feature in Hyper-V to expand it.
  3. Double-click the new expanded VHD to mount it.
  4. Use "Disk Management" to re-size the OS volume.
  5. Use "Explorer" to eject the mounted VHD.
  6. Use VhdPath parameter of New-ContainerHost.ps1 to reference the expanded VHD.

Connecting with the host VM from your workstation

  1. On the host add " -H" right after the first occurrence of "-b "Virtual Switch" and before the "goto" in the file "c:\ProgramData\docker\runDockerDaemon.cmd"

  2. Run net stop docker and net start docker to restart the Docker daemon

  3. Open the new port with: New-NetFirewallRule -Name "TCP2375" -DisplayName "TCP2375" -Protocol tcp -LocalPort 2375 -Action Allow -Enabled True

  4. Now set the DOCKER_HOST environment variable to your host VM IP: $env:DOCKER_HOST = "tcp://"

You can now use docker.exe from you workstation!

Cleaning up

Delete all stopped containers:

docker rm $(docker ps -a -q)

Delete all tagged images tagged with "none":

docker rmi $(docker images -q -f dangling=true)

Other stuff