Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run wagl in swarm #10

Open
greatbn opened this issue Jan 15, 2016 · 3 comments
Open

Can't run wagl in swarm #10

greatbn opened this issue Jan 15, 2016 · 3 comments

Comments

@greatbn
Copy link

greatbn commented Jan 15, 2016

Hi.
I haved read your readme and watch your demo video. But when I use docker-machine create swarm and ssh to swarm-master and run

docker run -d --restart=always  \
    --link=swarm-agent-master:swarm \
    -v /var/lib/boot2docker/ca.pem:/certs/ca.pem \
    -v /var/lib/boot2docker/server.pem:/certs/cert.pem \
    -v /var/lib/boot2docker/server-key.pem:/certs/key.pem \
    -p 53:53/udp \
    --name=dns \
    ahmet/wagl \
      wagl --swarm tcp://swarm:3376 \
      --swarm-cert-path /certs

It returned

Digest: sha256:b467b5a1d62771e01856ac65ce0b79716fb938e24ba133943359a4d4bdb955dc
Status: Downloaded newer image for ahmet/wagl:latest
Error response from daemon: Conflicting options: --net=host can't be used with links. This would result in undefined behavior

Please help me.
Thankyou

@ahmetb
Copy link
Owner

ahmetb commented Jan 15, 2016

@greatbn are you adding --net=host? I don't see it above.

@greatbn
Copy link
Author

greatbn commented Jan 16, 2016

@ahmetalpbalkan I just copy your command and paste to my swarm-master and run

@ahmetb
Copy link
Owner

ahmetb commented Jan 16, 2016

@greatbn You are right, it appears like this behavior is recently changed in Docker. You can do the following instead (note the docker-machine ip command):

eval $(docker-machine env swarm-master)
docker run -d --restart=always  \
    -v /var/lib/boot2docker/ca.pem:/certs/ca.pem \
    -v /var/lib/boot2docker/server.pem:/certs/cert.pem \
    -v /var/lib/boot2docker/server-key.pem:/certs/key.pem \
    -p 53:53/udp \
    --name=dns \
    ahmet/wagl \
      wagl --swarm tcp://`docker-machine ip swarm-master`:3376 \
      --swarm-cert-path /certs

This will place a dns container next to your swarm-agent-master container on the swarm-master machine.

I will update the README soon. Thanks for the notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants