Deploy a Windows "Docker-Machine" on Azure
MIT License
These templates will deploy and configure a Windows Server 2016/1709 VM instance with Windows Server Containers and Docker Engine 19.03. These items are performed by the template:
docker-machine
configuration in C:\.docker\machine\machines
Specify your local home directory path in machineHome
so the docker-machine config can be created exactly for your needs. Use the value of %USERPROFILE%
on Windows and $HOME
on Linux/Mac.
To connect to the Windows Docker Engine from a notebook you just have to copy the TLS certificates
from the Azure VM C:\.docker\machine\machines
to your home directory -> .docker/machine/machines
. Use the RDP session and copy the folder through RDP. For 1709 server core it is also possible. Just open notepad
, then Open
a file, browse to C:\.docker
and CTRL+C the folder.
Paste the folder into the home directory of your local user account.
Now you can use the local docker-machine
binary to switch environment variables to connect to the Docker engine running in the Azure VM.
Bash
$ eval $(docker-machine env az1709)
PowerShell
PS C:\> docker-machine env az1709 | iex
Now you are connected with the TLS protected Docker API of your Azure VM.
docker images
or start your first Windows container eg. from your Mac
docker run -it microsoft/windowsservercore:1709 cmd
This work is based on the Azure quickstart templates