« Back to projectatomic.io
Ask Your Question

Can I change default network with DOCKER_OPTS?

asked 2014-08-06 00:47:05 +0000

Andre Fernandes gravatar image

I cannot figure out how to change the default network from "" into something else permanently.

The DOCKER_OPTS variable should work, but it doesn't. Neither does starting the daemon manually with "--bip" option.

Is it a bug on Atomic?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-14 17:50:06 +0000

Andre Fernandes gravatar image

Got it! No need to mess with variables, since they are ignored.

  1. Copy docker config from R/O file system into R/W file system:

    cp /usr/lib/systemd/system/docker.service /etc/systemd/system/

  2. Enable editing:

    chmod +w /etc/systemd/system/docker.service

  3. Append the --bip parameter to ExecStart entry, using the new ip range you want:

    ExecStart=/usr/bin/docker -d --selinux-enabled -H fd:// --bip=

  4. Reboot and check the docker0 interface address with "ifconfig"

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools



Asked: 2014-08-06 00:47:05 +0000

Seen: 2,387 times

Last updated: Aug 14 '14