Kevin Wang
Kevin Wang

Reputation: 3330

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 &

Upvotes: 1

Views: 512

Answers (1)

elbaschid
elbaschid

Reputation: 51

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.

Ubuntu-based systems

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.

Upvotes: 1

Related Questions