These are the overall steps I followed in order to create a Docker demo in Azure, both against Linux and Windows containers. They are not very detailed, mostly because on the Windows side things are in preview. But the pointers should help.
Basically, steps allow you to install Docker client in Windows, setup a Linux host VM in Azure and finally setup a Windows docker host VM in Azure.
Of course, you could arrive at these steps looking here and there. What I'm doing here is to outline the steps I followed in a single place.
First comes the Docker Windows Client installation:
install Docker Windows client
@powershell -NoProfile -ExecutionPolicy Bypass -Command `
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install docker
install openssl client on Windows
Next in line is the creation of the Docker Linux Host on Azure:
create Azure Linux VM docker engine host
create an Ubuntu 14.04 Linux VM in the Azure Portal.
install docker in the host
protect Docker in the Linux host
Copy ca.pem, cert.pem and key.pem to Windows client's %USERPROFILE%\.docker
check communication between Docker client and Linux host
docker --tls -H tcp://<Linux Docker host FQDN, *.cloudapp.net>:4243 info
have some fun
set DOCKER_HOST=tcp://<Linux Docker host FQDN, *.cloudapp.net>:4243
docker run ubuntu:14.04 /bin/echo 'Hello world'
docker run -t -i /bin/bash
docker run -d ubuntu:14.04 /bin/sh -c "while true; do echo hello world; sleep 1; done"
docker logs <id>
docker stop <id>
docker version (notice Windows client & Linux server)
Host a web app on the Docker Linux Host
docker run -d -P training/webapp python app.py
docker logs <id>
<open endpoint in Azure, same public & private ports>
docker run -d -p <endpoint>:5000 training/webapp python app.py
navigate to http://<Linux Docker host FQDN, *.cloudapp.net>:<endpoint>/
Finally, we create the Windows Docker Host on Azure, a Windows Server 2016 Technical Preview version.
For this part, we could create this VM manually, configure its endpoints and other plumbing.
But, Visual Studio provides a better experience by allowing to create a new host from the "Publish..." dialog (announcement here).
publish web app to Windows container, creating the Windows container VM host in the process
create a new MVC app
publish project to Docker Container option, create new VM
connect to Windows Server 2016 docker host
set DOCKER_HOST=tcp://<Windows Docker host FQDN, *.cloudapp.net>:2376
copy Windows certs to %USERPROFILE%\.docker\
Appendix - Interesting Links
https://docs.docker.com/installation/windows/ (this is for creating a Linux Container Host on top of virtualbox in Windows)
https://docs.docker.com/installation/ubuntulinux/#installation (same as above; for Docker installation on the Ubuntu 14.04 created in Azure)
http://docs.docker.com/articles/https/ (for protecting the Docker endpoints)
https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/manage_docker (interesting, but it doesn't include how to manage the Windows Docker Host from the Windows Docker client)
https://msdn.microsoft.com/virtualization/windowscontainers/about/work_in_progress (important, since there is stuff you can't do - yet)
http://blogs.msdn.com/b/stevelasker/archive/2015/08/24/why-doesn-t-docker-tools-for-visual-studio-2015-show-the-new-button.aspx (I hit this issue, and installing the right versions was the solution)