1.删除镜像
docker images
docker rmi bf756fb1ae65 ##镜像id
2.停掉docker容器
docker ps -a
docker stop f8397131982c
3.删除容器
docker ps -a
docker rm 1a18447e378b
或者是直接找出后删除
docker rm -f `docker ps -a -q`
4.docker重启某个镜像
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e18cf4366179 percona/pmm-server:2 "/opt/entrypoint.sh" 3 hours ago Exited (0) 5 minutes ago pmm-server
cb94c09505a3 percona/pmm-server:2 "/bin/true" 3 hours ago Created pmm-data
[root@localhost ~]# docker restart e18cf4366179
5.登录容器
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e18cf4366179 percona/pmm-server:2 "/opt/entrypoint.sh" 3 hours ago Up 10 minutes (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp pmm-server
[root@localhost ~]#docker exec -ti pmm-server /bin/bash
标签:ps,管理,0.0,server,日常,pmm,docker,localhost From: https://www.cnblogs.com/hxlasky/p/17482850.html