osixia / docker-keepalived

Keepalived container image 🐳🌴
MIT License
402 stars 146 forks source link

Erratum in README.md #15

Open fcojperez opened 6 years ago

fcojperez commented 6 years ago

Hi,

if you execute docker run --cap-add=NET_ADMIN --net=host -d osixia/keepalived:1.4.2 and you execute docker logs. You will see this messages

*** Running /container/run/process/keepalived/run... Waiting config file /usr/local/etc/keepalived/keepalived.confok Wed May 9 12:27:04 2018: Starting Keepalived v1.4.2 (02/24,2018), git commit v1.4.1-41-g6a2987e+ Wed May 9 12:27:04 2018: WARNING - keepalived was build for newer Linux 4.4.6, running on Linux 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 Wed May 9 12:27:04 2018: Opening file '/usr/local/etc/keepalived/keepalived.conf'. Wed May 9 12:27:04 2018: Starting Healthcheck child process, pid=54 Wed May 9 12:27:04 2018: Starting VRRP child process, pid=55 Wed May 9 12:27:04 2018: Opening file '/usr/local/etc/keepalived/keepalived.conf'. Wed May 9 12:27:04 2018: Cannot find default interface eth0

And finally the container will exit.

Therefore, if we want running the container without error. Please update line above from README.md with this line.

run --cap-add=NET_ADMIN --net=bridge -d osixia/keepalived:1.4.2

Regards, Francisco Perez

BertrandGouny commented 6 years ago

Hello, i can't manage to assign an ip address to an interface using --net=bridge.

linkvt commented 4 years ago

A Bridge network does not make sense as this container should manage network interfaces of the host and not isolated virtual network interfaces of the container, besides that bridge is the default:

All containers without a --network specified, are attached to the default bridge network. This can be a risk, as unrelated stacks/services/containers are then able to communicate.

@BertrandGouny this issue can be closed, I guess the default interface had a different name which should be solved with the auto detection of my latest PR.