├── 1.13 ├── issues.md ├── limitations.md └── limitations │ ├── compose │ └── one-default-nat-net.md │ ├── engine │ └── swarm-init-needs-ip.md │ └── volumes │ └── driver-opts-not-supported.md ├── LICENSE └── README.md /1.13/issues.md: -------------------------------------------------------------------------------- 1 | # Docker 1.13 - Windows Issues 2 | 3 | There are some situations where Docker on Windows doesn't behave as expected. 4 | 5 | These are the known issues, with resolutions. 6 | 7 | ## Engine 8 | 9 | ### Publish port unavailable - HNS failed with error : Failed to create endpoint 10 | 11 | I haven't reliably replicated this, but it seems to happen when you have a container running with a published port and the host exits ungracefully. 12 | 13 | When the host restarts, the port mapping hasn't been cleared. It doesn't get cleared if you `docker rm` the old container either. 14 | 15 | If you `docker run` a new container trying to publish to the same port, you get the error from HNS (Windows Host Networking Service), because the port is still mapped. 16 | 17 | ####WORKAROUND 18 | 19 | Use PowerShell `NetNat` commands to clear the still-allocated port. E.g. for port 80: 20 | 21 | ``` 22 | Get-NetNatStaticMapping | ? ExternalPort -eq 80 | Remove-NetNatStaticMapping 23 | ``` 24 | 25 | [Credit to Kentico for the workaround](https://devnet.kentico.com/articles/running-kentico-in-a-docker-container). 26 | -------------------------------------------------------------------------------- /1.13/limitations.md: -------------------------------------------------------------------------------- 1 | # Docker 1.13 - Windows Limitations 2 | 3 | Docker on Windows does not have full feature parity with Docker on Linux for version 1.13. 4 | 5 | These are the known limitations running on Windows. 6 | 7 | ## Engine 8 | 9 | - No Docker-in-Docker 10 | - Windows Server containers can't be paused 11 | - Windows containers can't be committed to an image while running 12 | 13 | ## Swarm mode 14 | 15 | - [Swarm initialization needs IP addresses specified](limitations/engine/swarm-init-needs-ip.md) 16 | - Secrets not available 17 | - Services need to run with `--endpoint-mode=dnsrr` 18 | 19 | ## Volumes 20 | 21 | - [Driver options are not supported for local volumes](limitations/volumes/driver-opts-not-supported.md) 22 | - Some app platforms cannot access mounted volumes in the container 23 | 24 | ## Network 25 | 26 | - Published Ports On Windows Containers Don't Do Loopback 27 | - Exposed Ports aren't reachable without a manual firewall exception 28 | 29 | ## Docker Compose 30 | 31 | - [Only one 'default' NAT network can be created](limitations/compose/one-default-nat-net.md) 32 | -------------------------------------------------------------------------------- /1.13/limitations/compose/one-default-nat-net.md: -------------------------------------------------------------------------------- 1 | ### Only one 'default' NAT network can be created 2 | 3 | If you don't specify a network in the compose file, Docker Compose will try to create a network for the app using the default settings. Windows only allows one default NAT network (you can create other, but you need to explicitly specify the IP address range). 4 | 5 | ``` 6 | version: '3' 7 | 8 | services: 9 | 10 | web: 11 | image: microsoft/iis:windowsservercore 12 | ``` 13 | This compose file won't run because of the network issue: 14 | 15 | ``` 16 | > docker-compose up -d 17 | Creating network "temp_default" with the default driver 18 | ERROR: HNS failed with error : The parameter is incorrect. 19 | ``` 20 | 21 | ####WORKAROUND 22 | 23 | You need to explicitly configure an external network, which can be the default NAT or a custom one you create for the app: 24 | 25 | ``` 26 | version: '3' 27 | 28 | services: 29 | 30 | web: 31 | image: microsoft/iis:windowsservercore 32 | networks: 33 | - app-net 34 | 35 | networks: 36 | app-net: 37 | external: 38 | name: nat 39 | `` -------------------------------------------------------------------------------- /1.13/limitations/engine/swarm-init-needs-ip.md: -------------------------------------------------------------------------------- 1 | ### Swarm initialization needs IP addresses specified 2 | 3 | Overlay networking is [available in Windows 10](https://blogs.technet.microsoft.com/virtualization/2017/02/09/overlay-network-driver-with-support-for-docker-swarm-mode-now-available-to-windows-insiders-on-windows-10/) and coming soon to Server 2016. On Windows 10 you can run Docker in swarm mode, but the default initialization fails: 4 | 5 | ``` 6 | > docker swarm init 7 | Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (...) - specify one with --advertise-addr 8 | ``` 9 | 10 | If you follow the advice in the error, the `init` command just hangs: 11 | 12 | ``` 13 | > docker swarm init --advertise-addr 192.168.2.214 14 | # NEVER RETURNS # 15 | ``` 16 | 17 | ####WORKAROUND 18 | 19 | Specify both the advertise and listen addresses: 20 | 21 | ``` 22 | > docker swarm init --advertise-addr 192.168.2.214 --listen-addr 192.168.2.214 23 | Swarm initialized: current node (...) is now a manager. 24 | ``` -------------------------------------------------------------------------------- /1.13/limitations/volumes/driver-opts-not-supported.md: -------------------------------------------------------------------------------- 1 | ### Driver options are not supported for local volumes 2 | 3 | You can't create a volume at a specific location, you have to use the defaults. 4 | 5 | ``` 6 | docker volume create vol1 7 | ``` 8 | 9 | Creates a volume where the mountpoint is something like `C:\ProgramData\docker\columes\vol1\_data`. 10 | 11 | If you have a RAID array on `E:` you can't use that for the mountpoint as you could in Linux, because options aren't supported: 12 | 13 | ``` 14 | > docker volume create vol2 --opt device=e:\data 15 | Error response from daemon: create vol2: options are not supported on this platform 16 | ``` 17 | 18 | ####WORKAROUND 19 | 20 | None. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Elton Stoneman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-windows-kb 2 | 3 | Knowledgebase for Docker running natively on Windows - that's [Docker for Windows](https://docs.docker.com/docker-for-windows/) on Windows 10, and [Docker on Windows Server 2016](https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server). 4 | 5 | Covering expected gaps in functionality and unexpected issues, with workarounds where known. 6 | 7 | > Contributions welcome. 8 | 9 | ## Docker 1.13 10 | 11 | * [Limitations](1.13/limitations.md) - where Docker on Windows doesn't have feature parity with Linux 12 | * [Issues](1.13/issues.md) - where Docker on Windows behaves unexpectedly 13 | --------------------------------------------------------------------------------