重启一下这个docker
[root@VM-0-16-centos zk]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f9093ad7e4e3 zookeeper:3.7 “/docker-entrypoin…” 12 minutes ago Restarting (14) 4 minutes ago zk1
45c7388bedfd mysql:5.7 “docker-entrypoint…” 5 days ago Up 3 days 33060/tcp, 0.0.0.0:10050->3306/tcp mysql-master
[root@VM-0-16-centos zk]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f9093ad7e4e3 zookeeper:3.7 “/docker-entrypoin…” 12 minutes ago Restarting (14) 4 minutes ago zk1
32096b179af5 redis:6.0.8 “docker-entrypoint…” 2 days ago Exited (0) 2 days ago redis-node-3
7055b8656676 redis:6.0.8 “docker-entrypoint…” 2 days ago Exited (0) 2 days ago redis-node-2
138bbba4e1ee redis:6.0.8 “docker-entrypoint…” 2 days ago Exited (0) 2 days ago redis-node-1
45c7388bedfd mysql:5.7 “docker-entrypoint…” 5 days ago Up 3 days 33060/tcp, 0.0.0.0:10050->3306/tcp mysql-master
[root@VM-0-16-centos zk]# docker restart f9093ad7e4e3
f9093ad7e4e3
[root@VM-0-16-centos zk]# docker exec -it zk1 bash
失败了
Docker(八)Container无法正常启动Restarting (1) Less than a second ago的原因及解决办法_凝眸伏笔的博客-CSDN博客
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
abcba6e6ceb5 zookeeper:3.7 “/docker-entrypoin…” 25 minutes ago Restarting (14) 10 minutes ago zk2