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

How to connect to docker after restarting

藏色散人
Release: 2020-03-16 11:14:18
Original
2036 people have browsed it

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
Copy after login

You can see that two containers were closed before 13 minutes

Restart the container

docker restart 1236a
Copy after login

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

sudo nvidia-persistenced --persistence-mode
Copy after login

Check if the container is restarted

docker ps
Copy after login

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
Copy after login

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

docker run 
--restart=always
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template