Michael Neale
Michael Neale

Reputation: 19468

docker daemon restarting containers when not required to

According to this documentation, I should be able to add -r=false - to the docker daemon - however adding this to the DOCKER_OPTS seems to have no effect.

Rebooting causes it to restart containers that I want to run under supervision.

On ubuntu, this is in /etc/init.d/docker:

DOCKER=/usr/bin/docker
DOCKER_PIDFILE=/var/run/docker.pid
DOCKER_OPTS="-r=false"

Upvotes: 2

Views: 3465

Answers (1)

Michael Neale
Michael Neale

Reputation: 19468

On Ubuntu - you will want to use the service command, not init.d script.

service docker restart

to restart.

The config for this is in:

/etc/init/docker.conf

You can add -r=false in there, after the -d parameter - and it works. Ignore the /etc/init.d/docker script on ubuntu.

Upvotes: 7

Related Questions