Share & learn

Through Innovative Digital Library

How to enable docker container restart.

what is the command to restart container even after docker service start.


Posted by Alex on February 2nd 2018 20:49 PM

By default docker container will not start after service or server restart but docker container can be set to start even after docker service restart with below command. However you can also set other policies such as: always, on failure and unless-stopped with --restart options.

#docker container run -d --name itspring --restart always httpd

#docker ps

#systemctl restart docker

#docker ps
Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character

related questions

Most liked questions

Most answered questions

7M43 Refresh
7M43 Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Minimum 20 character
7M43 Refresh