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:

  • Motivation for putting Docker containers inside an AWS EC2 instance
  • Running a Docker container on AWS Elastic Beanstalk - Where is my web app?
  • How to deploy django 1.8 on Elastic Beanstalk using Docker
  • combining cloudbees ec2 docker image with docker in docker
  • How I can inject artifact from AWS S3 inside Docker image?
  • docker COPY not working when deploying with docker-machine
  • docker -H -d &

  • Debugging linked docker containers when using docker-compose
  • How does mirror registry work in docker?
  • Docker shows inconsistent behaviour when creating container from image
  • docker cannot start on windows
  • Docker: execute a program that requires tty
  • nginx load balancer IP-requester based
  • 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.