docker-3-常用命令(下)
importance
1、启动守护式容器


2、查看容器日志



3、查看容器内运行的进程
docker top 容器ID

4、查看容器内部细节以JSON串进行显示
docker inspect 容器ID

5、进入正在运行的容器并以命令行交互
1、docker exec -it 容器ID bashShell

2、重新进入docker attach 容器ID



attach Attach to a running container # 当前 shell 下 attach 连接指定运行镜像
build Build an image from a Dockerfile # 通过 Dockerfile 定制镜像
commit Create a new image from a container changes # 提交当前容器为新的镜像
cp Copy files/folders from the containers filesystem to the host path #从容器中拷贝指定文件或者目录到宿主机中
create Create a new container # 创建一个新的容器,同 run,但不启动容器
diff Inspect changes on a container's filesystem # 查看 docker 容器变化
events Get real time events from the server # 从 docker 服务获取容器实时事件
exec Run a command in an existing container # 在已存在的容器上运行命令
export Stream the contents of a container as a tar archive # 导出容器的内容流作为一个 tar 归档文件[对应 import ]
history Show the history of an image # 展示一个镜像形成历史
images List images # 列出系统当前镜像
import Create a new filesystem image from the contents of a tarball # 从tar包中的内容创建一个新的文件系统映像[对应export]
info Display system-wide information # 显示系统相关信息
inspect Return low-level information on a container # 查看容器详细信息
kill Kill a running container # kill 指定 docker 容器
load Load an image from a tar archive # 从一个 tar 包中加载一个镜像[对应 save]
login Register or Login to the docker registry server # 注册或者登陆一个 docker 源服务器
logout Log out from a Docker registry server # 从当前 Docker registry 退出
logs Fetch the logs of a container # 输出当前容器日志信息
port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT # 查看映射端口对应的容器内部源端口
pause Pause all processes within a container # 暂停容器
ps List containers # 列出容器列表
pull Pull an image or a repository from the docker registry server # 从docker镜像源服务器拉取指定镜像或者库镜像
push Push an image or a repository to the docker registry server # 推送指定镜像或者库镜像至docker源服务器
restart Restart a running container # 重启运行的容器
rm Remove one or more containers # 移除一个或者多个容器
rmi Remove one or more images # 移除一个或多个镜像[无容器使用该镜像才可删除,否则需删除相关容器才可继续或 -f 强制删除]
run Run a command in a new container # 创建一个新的容器并运行一个命令
save Save an image to a tar archive # 保存一个镜像为一个 tar 包[对应 load]
search Search for an image on the Docker Hub # 在 docker hub 中搜索镜像
start Start a stopped containers # 启动容器
stop Stop a running containers # 停止容器
tag Tag an image into a repository # 给源中镜像打标签
top Lookup the running processes of a container # 查看容器中运行的进程信息
unpause Unpause a paused container # 取消暂停容器
version Show the docker version information # 查看 docker 版本号
wait Block until a container stops, then print its exit code # 截取容器停止时的退出状态值
docker-3-常用命令(下)的更多相关文章
- Dockerfile指令及docker的常用命令
DockerfileFROM: FROM <image> FROM <image>:<tag> MAINTAINER: MAINTAINER <name> ...
- 【Docker入门】Docker的常用命令
了解和安装完docker之后,我们学习一下docker的常用命令就和当初学linux命令一样,放心命令其实大致相同只不过细节不同. 一.Docker启动类命令 1.启动docker:syste ...
- Docker Kubernetes 常用命令
Docker Kubernetes 常用命令 增 # 通过文件名或标准输入创建资源. kubectl create # 读取指定文件内容,进行创建.(配置文件可指定json,yaml文件). kube ...
- Docker(二十二)-Docker Swarm常用命令
#查看集群节点 docker node ls #创建nginx服务 #docker pull hub.test.com:5000/almi/nginx:0.1 #下载私有仓库镜像 docker ser ...
- Docker Swarm常用命令
#查看集群节点 docker node ls #创建nginx服务 #docker pull hub.test.com:5000/almi/nginx:0.1 #下载私有仓库镜像 docker ser ...
- Docker学习(三)认识Docker和常用命令
Docker学习(三)认识Docker和常用命令 Docker体系结构 docker服务端,作为服务的提供方,核心进程 docker daemon,所有docker命令都是通过这个进程完成的 REST ...
- 记录下docker的常用命令
常用命令: docker images:查看本地所有镜像 docker pull centos:7:从仓库中获取镜像 docker ps:列出所有正在运行的容器 docker ps -a:列出所有容 ...
- Docker之常用命令(二)
这篇博客就不扯皮了,简单粗暴地贴上自己整理的一份Docker常用命令. docker search ** // 查找镜像 docker pull nginx // 载入镜像 # -a 拉取所有tagg ...
- Docker:常用命令大全 [七]
一.docker的命令的解释 1.命令解释 docker run -d -p 80:80 nginx run (创建并运行一个容器) -d 放在后台 -p 端口映射 nginx docker镜像的名字 ...
- docker的常用命令汇总
1================================================================================ docker 列出每个容器的IP ...
随机推荐
- .NET 中使用阿里云短信的 API 接口
小弟初来乍到,这也是我的第一篇文章,写的不好的地方还望指正.谢谢各位! 引言 短信服务(Short Message Service)是阿里云为用户提供的一种通信服务的能力,支持快速发送短信验证码.短信 ...
- java 并发(五)---AbstractQueuedSynchronizer(5)
问题 : ArrayBlockQueue 和 LinkedBlockQueue 的区别 两者的实现又是怎么样的 应用场景 BlockingQueue 概述 blockingQueue 是个接口,从名字 ...
- java 并发(五)---AbstractQueuedSynchronizer(3)
文章代码分析和部分图片来自参考文章 问题 : CountDownLatch 和 CyclicBarrier 的区别 认识 CountDownLatch 分析这个类,首先了解一下它所可以 ...
- css兼容小问题
1.RGBA在CSS3.0体现,不向下兼容: 2.非float元素和float元素在一起版本时,非float元素会排斥float元素,为避免换行,float元素应优先显示(放非float元素之前)
- System.arraycopy的测试
ArrayList的源码中数组的拷贝用到该方法: public static void arraycopy(Object src, --源数组 int srcPos, --源数组要复制的起始位置 Ob ...
- 1.JDBC基础
JDBC全称Java Database Connectivity,即Java数据库连接.(以下以MySQL为例,使用MySQL语句) Sun公司提供了标准JDBC API接口,没有实现具体类.各个数据 ...
- HOST文件配置
HOST文件配置位置:C:\Windows\System32\drivers\etc\HOSTS 127.0.0.1 localhost 127.0.0.1 app.weilan.com 127.0. ...
- mysql 去除重复数据
1. 问题描述 有时load或者insert操作导致 表数据有重复 2. 解决方案 通过临时表.主键id.倒腾去重 示例 2.1 create table student( name varchar ...
- SQLServer导入大sql文件报错 对 COM 组件的调用返回了错误 HRESULT E_FAIL。 (mscorlib)
打开cmd执行(d:\script.sql为sql文件位置): sqlcmd -S 127.0.0.1 -U sa -P sa -i d:\script.sql From:https://ww ...
- easyui numberbox 输入框禁止输入
{ field: 'Amount', title: '金额', width: 80, editor: { type: 'numberbox', options: { disabled: true, p ...