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:

  • Google Kubernetes storage in EC2
  • Exposing Elastic Beanstalk environment variables to Laravel's artisan using Docker
  • Setting up logs location for Docker Logstash image
  • Docker push to AWS ECR fails on Windows: no basic auth credentials
  • Deploy-time commands inside Docker on Elastic Beanstalk
  • Dockerfile in a Amazon EB
  • docker -H 0.0.0.0:2375 -d &

  • Modifying a docker image
  • Web Socket handshake error in Docker
  • Docker Notary no trust data available
  • Is there a way to tell kubernetes to update your containers?
  • $GEM_HOME and $GEM_PATH are wrongly set in Passenger
  • How do I push an image to my NON-public repo in dockerhub
  • 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.

    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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.