Specifying Docker daemon host in Elastic Beanstalk
I’d like to set a proper docker host when running the daemon on boot.
Is there any way I can pass runtime flags? Ideally I’d like to reproduce:
docker -H 0.0.0.0:2375 -d &
One Solution collect form web for “Specifying Docker daemon host in Elastic Beanstalk”
I’ve been looking at the same and it seems that the “right” way to do this depends on the system that you are using.
The official docs explain it for Ubuntu under the networking section. Update the
DOCKER_HOST variable in
/etc/default/docker and restart the docker daemon.
Beanstalk Docker AMI
The file is in a different location:
/etc/sysconfig/docker and contains a setting
other_arg"-r=false". Add any options you want to pass to the Docker daemon at startup.
Restarting Docker daemon
As I am not too familiar with the internal workings of EB and how the Docker daemon is run, I’d suggest rebooting the EC2 instance afterwards. This will start Docker with the modified settings in the appropriate file.
I hope that helps.