1.命令: docker search mysql

2.命令:docker pull mysql:5.6,或者不指定版本 :docker pull mysql
3.命令:docker images

4.命令: docker run --restart=always --name first-mysql -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=123456 -d mysql:latest

5.删除当前容器命令:
a.首先查看container id 命令:docker ps

b.停止正在运行的mysql 命令: docker stop 584472756e37
c.删除容器命令:docker rm 584472756e37
6.进入mysql: docker exec -it first-mysql bash

a.查看镜像列表:docker images
b.启动服务:docker start container name/container id;比如:docker start 584472756e37,或者docker start first-mysql
596

被折叠的 条评论
为什么被折叠?



