Skip to content

Instantly share code, notes, and snippets.

@JPustkuchen
Last active January 9, 2018 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JPustkuchen/9bffa7c423843a7bfdcda24796bd2a91 to your computer and use it in GitHub Desktop.
Save JPustkuchen/9bffa7c423843a7bfdcda24796bd2a91 to your computer and use it in GitHub Desktop.
[Docker set default binding IP e.g. for links in portainer] #docker

cd /etc/default/docker (if not existing, create the file)

Add the following line (or the --ip=... part if already existing):

DOCKER_OPTS="--ip=192.168.123.123" (Your docker host IP)

Restart docker: systemctl stop docker systemctl start docker

Don't forget to ensure that the docker host always receives the same IP.

See: https://docs.docker.com/engine/reference/commandline/dockerd/#options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment