projectatomic / atomic-site

Source code for projectatomic.io
projectatomic.io
Other
82 stars 121 forks source link

Getting started should mention how to add /run/flannel/docker to the docker #575

Open kbrowder opened 6 years ago

kbrowder commented 6 years ago

So AFAICT (though I might be missing something) /run/flannel/docker isn't ever actually added as an environment file for docker or docker-latest on Atomic EL7, so the flannel settings don't make it to docker. Specifically I think DOCKER_NETWORK_OPTIONS=" --bip=flannelcidr --ip-masq=true --mtu=flannelmtu" is required right? What I did was create a drop-in file in /etc/systemd/system/docker-latest.service.d/flannel.conf (I'm using docker-latest, but I think regular docker has this issue as well) which seems like a generally applicable way to do this:

[Service]
EnvironmentFile=-/run/flannel/docker

And this seems to work. I guess the alternative would be to make the flannel rpm install this (or make docker/docker-latest rpms include the flannel environment file by default, i guess with the =- so that if users don't have flannel installed and running it won't be picked up), but maybe it's more reasonable to to change the "getting started" doc.