Home  >  Article  >  Operation and Maintenance  >  How to connect to docker after restarting

How to connect to docker after restarting

藏色散人
藏色散人Original
2020-03-16 11:14:181994browse

How to connect to docker after restarting

How to connect to docker after restarting?

How to reconnect to docker after restarting the server

The azure cloud service was inexplicably disconnected today (it automatically restarted), and I broke out in a cold sweat. Fortunately, docker There is storage.

Check the containers that were closed due to restart

docker ps -a

You can see that two containers were closed before 13 minutes

Restart the container

docker restart 1236a

If restarted If it fails, check if the graphics card driver is normal. If not,

sudo nvidia-persistenced --persistence-mode

Check if the container is restarted

docker ps

See if pycharm can update the code. Generally, it can be updated after restarting

Set up a permanent restart and self-start

sudo docker update --restart=always 1236a

This restart and self-start operation can be done in one step in docker run

docker run 
--restart=always

Recommended learning: docker tutorial.

The above is the detailed content of How to connect to docker after restarting. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn