Docker Setup and Snippets
These are some helper script to setting up and running a docke container in Windows.
docker-machine
Docker for windows uses docker-machine insted of boot2win. http://docs.docker.com/installation/windows/
installed
VirtualBox & Docker. VirtualBox to host the linux vm running docker.
create docker machine in windows
docker-machine create --driver virtualbox docker-machine-vm
start docker start up process
docker-machine.exe start $machineName docker-machine env --shell=powershell $machineName | Invoke-Expression
stop docker machine in windows
docker-machine stop $machineName
Certificates
Certificates not generated in the right place http://stackoverflow.com/questions/31561801/docker-machine-ca-pem-not-found missing from ~/.docker/machines/machine/<machineName>/*
Connect/Start to a docker machine vm in windows
docker-machine env --shell=powershell $machineName | Invoke-Expression
Mounter Folders
Folders mounted on the command line are from the docker-machine-vm not the windows box IE var/unix/addr.
Must use ~/ for project to be mounted into docker-machine because any other folder will not mount properly in VirtualBox
SSH into docker machine vm
docker-machine ssh <docker-machine-vm>
Sidenote: nginx
For a file file to refresh in a browser sendfile off;
is required because there is a bug in virtualbox.