Consul server web ui no available from docker container

1,565 views
Skip to first unread message

Andrew Romanov

unread,
Sep 11, 2014, 7:49:28 PM9/11/14
to consu...@googlegroups.com
Hello,
  I am running consul agent in server mode inside docker container. The problem I have is that even though I specified path to web_ui directory and exposed 8500 port, I still can't see it. Here is Dockerfile: http://pastebin.com/Az1QRafQ . If I connect to this consul server from local machine using same command, I can see web interface on localhost (with 2 nodes - docker and local).

Hector Castro

unread,
Sep 11, 2014, 9:36:25 PM9/11/14
to Andrew Romanov, consu...@googlegroups.com
Hey Andrew,

Your CMD instruction needs to override the address that Consul binds
to client interfaces with (HTTP, DNS, and RPC):

CMD consul agent -server -client 0.0.0.0 -bootstrap-expect 1
-data-dir /tmp/consul -ui-dir /webui/

Note the addition of the `-client` argument.

--
Hector
> --
> You received this message because you are subscribed to the Google Groups
> "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to consul-tool...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andrew Romanov

unread,
Sep 12, 2014, 2:58:33 PM9/12/14
to consu...@googlegroups.com, judo...@gmail.com
Thanks. It worked

Koumudini Bhute

unread,
Dec 15, 2015, 7:25:43 AM12/15/15
to Consul, judo...@gmail.com, hectc...@gmail.com
It worked for me too. However I needed to pass --net=host to 'docker run' command.

Thanks. :)
Reply all
Reply to author
Forward
0 new messages