Docker常用命令
跳到导航
跳到搜索
容器
# 查看容器
docker ps -a
# 删除容器
docker rm <ID>
# 创建容器
docker run --name mynginx -p 80:80 -d mynginx_image
# 停止容器
docker stop <ID>
镜像
# 查看镜像
docker image ls
# 删除镜像
docker rmi <ID>
# 创建镜像
docker build -t mynginx_image .
Dockerfile
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY content /usr/share/nginx/html
COPY conf /etc/nginx
更多信息访问 BubbleStudy BubbleStudy https://bubblestudy.info/wiki/