Share & learn

Through Innovative Digital Library

How to enable docker container restart.

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



Answers

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
7M43

related questions

Most liked questions

Most answered questions

Login
7M43 Refresh
Register
7M43 Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Reply
Minimum 20 character
7M43 Refresh