docker常用笔记汇总
source link: https://blog.p2hp.com/archives/9415
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
docker常用笔记汇总 | Lenix Blog
一 常用命令使用
docker version 查下docker版本
systemclt start docker 启动容器
docker search 镜像搜索
docker images 列出镜像
docker pull 镜像名 获取镜像
docker pull busybox:latest 最新镜像获取
docker save busybox:latest -o busybox.tar
导出镜像docker rmi busybox
删除镜像docker load -i busybox.tar
导入镜像docker run --name busybox_v1(自定义容器名字) busybox:latest(镜像名字)
docker run --name ngx_v1 nginx:latest 未指定镜像名,直接下载运行容器
docker exec -it d268 /bin/bash 进入容器
docker inspect 容器ID 查看容器信息
docker port 使用 docker port 可以查看指定 (ID 或者名字)容器的某个确定端口映射到宿主机的端口号。
-----------------------------------
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK