1.安装docker
2.查看docker版本 : docker version
3.查看镜像 : docker images
4.拉取镜像:docker pull
5.跑起来一个镜像: docker run -d --hostname hostparam --name nameparam -p 15672:15672 -p 5672:5672
6.linuxip地址,
VM选择桥接,使用真实网卡(这样会占用一个真实网段的ip,局域网内计算机比较多的话,网段内地址可能不够用)
VM选择NAT模式,使用的是VMnet8,
VM选择hostonly使用的是VMnet1
7.关闭防火墙
systemctl stop firewalld
8.运行容器
docker run -it 镜像名 /bin/bash
9.进入容器
docker exec -it 容器ID /bin/bash/
容器停止并退出
exit
容器不停止退出
Ctrl + p + q
10.删除容器
docker rm 容器id
docker rm -f $(docker ps -aq) 删除所有容器
11.删除镜像
docker rmi 镜像id