Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanscherer/docker-windows-azure
Deploy a Windows "Docker-Machine" on Azure
https://github.com/stefanscherer/docker-windows-azure
azure docker-engine docker-machine windows-containers
Last synced: 3 months ago
JSON representation
Deploy a Windows "Docker-Machine" on Azure
- Host: GitHub
- URL: https://github.com/stefanscherer/docker-windows-azure
- Owner: StefanScherer
- License: mit
- Created: 2016-01-31T14:45:01.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2020-07-21T18:15:06.000Z (over 4 years ago)
- Last Synced: 2024-10-04T13:26:46.676Z (3 months ago)
- Topics: azure, docker-engine, docker-machine, windows-containers
- Language: PowerShell
- Homepage:
- Size: 1.6 MB
- Stars: 19
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-windows-azure
## Windows Server 2019 LTS channel
## Windows Server 2016 LTS channel
## Windows Server 1709 Semi-annual channel
## Windows Server 1803 Semi-annual channel
## Windows Server 1903 Semi-annual channel
## Windows Server 1909 Semi-annual channel
## Windows Server 2004 Semi-annual channel
## Deployment
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:
* Deploy the prepared Windows Server Container Image with Docker 19.03
* base OS image microsoft/windowsservercore:\*
* base OS image microsoft/nanoserver:\*
* Create TLS certificates for the Docker Engine
* Prepare a `docker-machine` configuration in `C:\.docker\machine\machines`
* Open Ports for RDP (3389), Docker (2376), as well as HTTP (80) and HTTPS (443).
* Install additional Docker tools:
* Docker Compose
* Docker MachineSpecify 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.
![](images/az1709.png)
## Connect to Docker Engine
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.![](images/copy-certs-1709.png)
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
```bash
$ eval $(docker-machine env az1709)
```PowerShell
```bash
PS C:\> docker-machine env az1709 | iex
```Now you are connected with the TLS protected Docker API of your Azure VM.
```bash
docker images
```![docker-run-cmd](images/docker-images.png)
or start your first Windows container eg. from your Mac
```bash
docker run -it microsoft/windowsservercore:1709 cmd
```![docker-run-cmd](images/docker-run-cmd.png)
## Credits
This work is based on the Azure quickstart templates
* https://github.com/Azure/azure-quickstart-templates/tree/master/windows-server-containers-preview
* https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-winrm-windows