docker --help 可以列出所有docker指令
docker image --help 可以列出所有docker 镜像指令
----docker 镜像管理— docker image command(有很多命令可以把
docker info
build Build an image from a Dockerfile
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Display detailed information on one or more images
load Load an image from a tar archive or STDIN
ls List images
prune Remove unused images
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rm Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
docker image ls 列出本地镜像
docker history gonivinck_mysql 列出构建镜时用到的部骤
docker inspect gonivinck_mysql 列出建镜像详细信息
docker pull gonivinck_mysql 下载镜像
----docker 容器管理----
docker container ps 列出当前有哪些启动容器 docker container ps -a 列出所有容器 docker container ps -q 列出所有容器ID
docker container ps l 列出最新创建的容器
docker exec -it gonivinck_mysql_1 bash 进入对应容器
docker exec web(容器名) ls 不进入容器直接运行命令(免交互执行)
docker commit 创建一个新镜像来至于一个容器
docker port gonivinck_mysql_1 显示容器暴露的端口
docker top gonivinck_mysql_1 查看容器里面的进程
docker stats gonivinck_mysql_1 查看容器运行状态 docker stats gonivinck_mysql_1 --no-stream
docker stop/start/restart gonivinck_mysql_1 停止/启动/重启容器
docker container prune 移除所有已停止的容器
docker rm -f $(docker ps -qa) 移除所有容器
什么是 Dockerfile?
Dockerfile 是一个用来构建镜像的文本文件,文本内容包含了一条条构建镜像所需的指令和说明。
构建和启动运行我们的服务容器
docker-compose up -d



