1.运行一个基础镜像容器: docker run --name=nginx -p 80 -itd centos -p 把容器端口随机在物理机随机映射一个端口 此时容器里还未安装Nginx,访问会失败 2.进入容器 通过上面可以看到