Reputation: 111
I have already setup a few containers based on one image but every time I boot the hosts (in Ubuntu primarily) I have to restart multiple docker container manually but the majority has the same image.
I know I can do it with some kind of customisation to the boot command but I am curious whether I can directly just have the command start containers that are based on selected images since each of these containers have different names.
Thank you.
Upvotes: 0
Views: 953
Reputation: 6079
Use the --restart=always
on docker run
.
More details in:
https://docs.docker.com/engine/reference/run/#restart-policies-restart
Upvotes: 1