Nomad, docker, consul connect and running containers on 127.0.0.1

75 views
Skip to first unread message

a.la...@gmail.com

unread,
Mar 21, 2019, 7:13:42 AM3/21/19
to Nomad
Hi all, 
I am trying to setup consul connect and nomad for a bunch of containers. However, to avoid other services to hit directly the containers bypassing consul-connect, I'd like to have all my containers running on 127.0.0.1.
Is this something I can easily achieve in the nomad job definition?

Cheers,
ALF

ja...@fpcomplete.com

unread,
Apr 10, 2019, 11:38:26 PM4/10/19
to Nomad
FWICT, not directly, but you can still do it.. it's just a little annoying. The method I've used to do this is to write a wrapper script/tool that sets up the docker container the way you expect, passing stdout/etc along, and putting your containers on 127.0.0.1

You might be better off using the docker networking configuration to achieve the isolation you are looking for.

Chris Baker

unread,
Apr 11, 2019, 8:40:39 AM4/11/19
to Nomad
We are in the process of adding support for network namespacing, to support exactly this use case using Nomad-native features.
Reply all
Reply to author
Forward
0 new messages