fabio: Q: Can't Load Docker Container
On Centos7, I can’t get the fabio Docker container working
Consul& Registrator
docker run -d --name consul -p 8500:8500 -p 172.17.0.1:53:8600/udp -p 8400:8400 gliderlabs/consul-server -node myconsul -bootstrap
docker run -d --name registrator -v /var/run/docker.sock:/tmp/docker.sock --net=host gliderlabs/registrator -internal consul://localhost:8500
both work fine, on default setups/ports
Bin
/usr/local/bin/fabio
binary works fine
Trying Fabio Container
docker run -d -p 9999:9999 -p 9998:9998 -v content/config$PWD/fabio/fabio.properties:/etc/fabio/fabio.properties magiconair/fabio
This creates the container but exits it immediately, and won’t start thereafter. Tried running /usr/local/bin/fabio
concurrently, but no joy
Any ideas? Regards
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (8 by maintainers)
I’m no docker expert but this sequence of commands starts up fabio with consul in a Docker container. Maybe someone with more experience can comment on this:
I think the default bridge networking bridges the two
eth0
interfaces between the containers but that doesn’t (shouldn’t) work for thelo0
interface. So the way I understand this is that127.0.0.1
in the consul container is different from127.0.0.1
in the fabio container since these two interfaces aren’t bridged. But again, take all this with a huge grain of salt since I’ve just skimmed over the Docker networking documentation and augmented this with some assumptions on how networks can/should work.Um… you can just run
docker run -p 9999:9999 -p 9998:9998 --net host fabiolb/fabio
and it will use the host’s network, where the consul port should be available.Of course, this will work assuming that you don’t provision fabio instances dynamically.