正确
(1)下载镜像,docker pull nginx
(2)启动容器,docker run -d -p 8083:80 nginx
[root@ceshi ~]# docker exec -it 8ca3711a5268 bash
root@8ca3711a5268:/# apt-get update
root@8ca3711a5268:/# apt-get install vim
错误 ---163源是废品,不能用
6.下载镜像
# docker pull hub.c.163.com/library/tomcat:latest
# docker pull hub.c.163.com/library/nginx:latest
# docker exec -ti a62119e032b3 /bin/bash 进入后台容器并提供bash
# /usr/sbin/nginx 启动nginx服务
# apt-get update 升级vim
# apt-get install vim 安装vim
root@6e98acc7698b:/# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim