//进入nginx容器
docker exec -it nginx bash
//更新安装库
apt-get update
//容器里面安装vim
apt-get install vim
//安装lszrz
apt-get install -y lrzsz
//安装zip unzip
apt-get install -y zip unzip
//退出nginx容器
exit;
//docker停止nginx
docker stop nginx
//docket启动nginx
docker start nginx
//删除docker中的镜像
docker rmi 镜像id
//查看当前正在运行的容器
docker ps
//已退出的容器,可以使用如下命令进行查看
docker ps -a
//删除docker中的容器
docker rm 容器id
//启动nginx
docker run --name nginx -p 80:80 -d nginx
docker run --name nginx -p 80:80 -v /home/docker-nginx/nginx.conf:/etc/nginx/nginx.conf -v /home/docker-nginx/vhosts.conf:/etc/nginx/conf.d/vhosts.conf -v /home/docker-nginx/log:/var/log/nginx -v /home/docker-nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf -d nginx
docker run --name nginx -p 80:80 -v /home/docker-nginx/nginx.conf:/etc/nginx/nginx.conf -v /home/docker-nginx/log:/var/log/nginx -v /home/docker-nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf -d nginx
docker run --name nginx -p 80:80 -v /home/docker-nginx/nginx.conf:/etc/nginx/nginx.conf -v /home/docker-nginx/log:/var/log/nginx -v /home/docker-nginx/conf.d/vhosts.conf:/etc/nginx/conf.d/vhosts.conf -d nginx