real
real

Reputation: 669

Restarting containers after docker-machine host is rebooted

I am using docker-machine to manage containers on a host on DigitalOcean, as described here (Docker documentation). If my host on DigitalOcean ever reboots, I will have to manually start the containers on the remote host.

What would be a good method of restarting my containers (In the correct order) at the remote machine, while still letting me use docker-machine?

In the past I used a plain docker-engine with init / systemd / upstart configuration file. This forced me to deal with ssh-ing to the remote machine. Is there a way to get a similar effect using docker-machine?

Upvotes: 0

Views: 418

Answers (1)

Matthew
Matthew

Reputation: 11387

You probably want to add --restart always to your docker run command. See here. Note that you should design your system so that the order things come up in doesn't matter.

Upvotes: 2

Related Questions