pascalandy / docker-stack-this

A Docker Stack that just work. With Traefik, Socat, Portainer, Nginx, Caddy, Whoami
Other
166 stars 26 forks source link

invalid mount config for type bind #7

Closed pascalandy closed 7 years ago

pascalandy commented 7 years ago

(email by Matteo)

Message: Hi Pascal, I've some question about your docker-stack-this. I've Docker Swarm with 3 nodes and until the previous week, I used Docker Flow Proxy + Letsencrypt companion for manage different container. Sunday I decided to try Treafik because the Flow solution uses too much container. Using this command

docker service create \ --name traefik \ --constraint=node.role==manager \ --publish 80:80 --publish 443:443 --publish 8080:8080 \ --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock,readonly \ --mount type=bind,source=/var/tmp,target=/etc/traefik/acme \ --network traefik-net \ traefik \ --entryPoints='Name:http Address::80 Redirect.EntryPoint:https' \ --entryPoints='Name:https Address::443 TLS' \ --defaultEntryPoints=http,https \ --acme.entryPoint=https \ --acme.email=myawesomemail@gmail.com \ --acme.storage=/etc/traefik/acme/acme.json \ --acme.domains=myawesomesite.com \ --acme.onHostRule=true \ --docker \ --docker.swarmmode \ --docker.domain=myawesomesite.com \ --docker.watch \ --web

I can run traefik successfully. But in this case, I can't protect dashboard. So I decided to use a custom toml file, but I can't mount (with eval docker host mode) it correctly. I use this: https://gist.github.com/tehKapa/cd78c15e3b3655e7a78765595f446a9e

The only error that I have is "invalid mount config for type bind". Have you any suggestion?

Thanks!

pascalandy commented 7 years ago

This must be an absolute path :) https://gist.github.com/tehKapa/cd78c15e3b3655e7a78765595f446a9e#file-traefik-yml-L13