sixeyed / docker-on-windows

Code samples for the book "Docker on Windows"
https://www.amazon.com/gp/product/1789617375/
Apache License 2.0
228 stars 124 forks source link

Traefik using named pipes in swarm mode #10

Open chimenesjr opened 4 years ago

chimenesjr commented 4 years ago

Hi Elton, In chapter 7 you tell the swarm mode would be available until the release of the book. I'm trying with the same docker-compose form local but it's not working. I just want to check if my versions are correct to try this. Docker: 19.03.2 Windows: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.737) Thanks.

JawedCIA commented 4 years ago

Please try this,

 docker service create `
 --detach=true `
 --network nd-swarm `
 --constraint=node.role==manager `
 --publish 80:80 `
 --publish 8080:8080 `
 --name reverse-proxy `
 --mount type=npipe,source=\\.\pipe\docker_engine,target=\\.\pipe\docker_engine `
  sixeyed/traefik:v1.7.8-windowsservercore-ltsc2019 `
 --docker --docker.endpoint=npipe:////./pipe/docker_engine `
 --docker --docker.swarmMode --docker.watch `
 --logLevel=DEBUG --api

Docker version 19.03.5, build 2ee0c57608 OS Name: Microsoft Windows Server 2019 Datacenter OS Version: 10.0.17763 N/A Build 17763