【Howie玩docker】-Docker常用命令操作
attach 附加到一个运行的容器上面 --no-stdin=false Do not attach stdin --sig-proxy=true Proxify all received signal to the process (even in non-ttymode ) attach命令允许你查看或者影响一个运行的容器。你可以在同一时间attach同一个容器。你也可以从一个容器中脱离出来,是从CTRL-C。 build 根据Dockerfile 构建出一个容器 --no-cache=false Do not use cache when building the image -q, --quiet=false Suppress the verbose output generated by the containers --rm=true Remove intermediate containers after a successful build -t, --tag="" Repository name (and optionally a tag) to be applied to the resulting image in case of success commit 根据现有的容器的改变创建一个新的容器镜像 -a, --author="" Author (eg. "John Hannibal Smith <hannibal@a-team.com>" -m, --message="" Commit message cp 从容器里面拷贝文件/目录到本地一个路径 diff 列出一个容器里面被改变的文件或者目录,list列表会显示出三种事件,A 增加的,D 删除的,C 被改变的。events 从容器中获取实时事件 --since="" Show all events created since timestamp --until="" Stream events until this timestampexport 把容器的内容打包成tar包输出到标准输出history 显示一个镜像的历史 --no-trunc=false Don't truncate output -q, --quiet=false Only show numeric IDsimages 列出镜像列表 -a, --all=false Show all images (by default filter out the intermediate image layers) --no-trunc=false Don't truncate output -q, --quiet=false Only show numeric IDsimport 从一个tar包创建一个新的镜像 Usage: docker import URL|- [REPOSITORY[:TAG]] URL必须是以http开头的指向一个单独的tar包出现的文件系统。如果你想从本地目录或者tar包导入,则使用‘-’从标准输入代替数据来源info 显示docker系统的信息inspect 返回系统或者镜像的一些低层次的信息,默认会返回一些JSON格式的信息,如果你指定其他输出格式,也会显示其他格式的输出 http://golang.org/pkg/text/template/ kill kill一个运行的容器,发送SIGKILL信号,或者其他你指定的信号load 在标准输入加载一个tar包格式的镜像 -i, --input="" Read from a tar archive file, instead of STDINlogin 登陆registry server -e, --email="" Email -p, --password="" Password -u, --username="" Usernamelogs 从一个容器中取日志 -f, --follow=false Follow log output -t, --timestamps=false Show timestampsport 查看公共的端口经过NATA映射到私有的哪个端口ps 显示容器,默认只显示当前在运行的容器。 -a, --all=false Show all containers. Only running containers are shown by default. --before="" Show only container created before Id or Name, include non-running ones. -l, --latest=false Show only the latest created container, include non-running ones. -n=-1 Show n last created containers, include non-running ones. --no-trunc=false Don't truncate output -q, --quiet=false Only display numeric IDs -s, --size=false Display sizes --since="" Show only containers created since Id or Name, include non-running ones.pull 从docker的registry server 拉取镜像push 推一个镜像到docker registry serverrestart 重启一个正在运行的容器 -t, --time=10 Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default=10rm 删除一个或者多个容器 -f, --force=false Force removal of running container -l, --link=false Remove the specified link and not the underlying container -v, --volumes=false Remove the volumes associated to the containerrmi 删除一个或者多个镜像 -f, --force=false Force --no-prune=false Do not delete untagged parentsrun 在一个新的容器中运行一个命令 -a, --attach=[] Attach to stdin, stdout or stderr. -c, --cpu-shares=0 CPU shares (relative weight) --cidfile="" Write the container ID to the file -d, --detach=false Detached mode: Run container in the background, print new container id --dns=[] Set custom dns servers --dns-search=[] Set custom dns search domains -e, --env=[] Set environment variables --entrypoint="" Overwrite the default entrypoint of the image --env-file=[] Read in a line delimited file of ENV variables --expose=[] Expose a port from the container without publishing it to your host -h, --hostname="" Container host name -i, --interactive=false Keep stdin open even if not attached --link=[] Add link to another container (name:alias) --lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" -m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g) --name="" Assign a name to the container --net="bridge" Set the Network mode for the container 'bridge': creates a new network stack for the container on the docker bridge 'none': no networking for this container 'container:<name|id>': reuses another container network stack 'host': use the host network stack inside the contaner -P, --publish-all=false Publish all exposed ports to the host interfaces -p, --publish=[] Publish a container's port to the host format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort (use 'docker port' to see the actual mapping) --privileged=false Give extended privileges to this container --rm=false Automatically remove the container when it exits (incompatible with -d) --sig-proxy=true Proxify all received signal to the process (even in non-ttymode ) -t, --tty=false Allocate a pseudo-tty -u, --user="" Username or UID -v, --volume=[] Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container) --volumes-from=[] Mount volumes from the specified container(s) -w, --workdir="" Working directory inside the containersave 保存镜像到一个tar包 -o, --output="" Write to an file, instead of STDOUTsearch 在docker index中寻找镜像 --no-trunc=false Don't truncate output -s, --stars=0 Only displays with at least xxx stars -t, --trusted=false Only show trusted buildsstart 启动一个停止的容器 -a, --attach=false Attach container's stdout/stderr and forward all signals to the process -i, --interactive=false Attach container's stdinstop 停止一个容器 -t, --time=10 Number of seconds to wait for the container to stop before killing it.tag 给repository 中的镜像进行标记 -f, --force=false Forcetop 显示一个运行的容器里面的进程信息version 显示docker的版本信息wait 阻止容器直到容器停止,然后打印退出码【Howie玩docker】-Docker常用命令操作的更多相关文章
- 【Docker】docker 的常用命令&操作
一.在linux虚拟机上安装docker XShell1:检查内核版本,必须是3.10及以上 uname -r2:安装docker yum install docker3:输入y确认安装4:启动doc ...
- Docker系列之常用命令操作手册
目录 1.安装虚拟机 2.安装Docker 3.Docker镜像操作 4.Docker容器操作 Docker系列之常用命令操作手册 继上一篇博客Docker系列之原理简单介绍之后,本博客对常用的Doc ...
- 因为一个Docker问题,我顺手整理从安装到常用命令操作手册
今天,自己写了一部分业务代码,是常规代码的另外一种方式,不能在公司的服务器上测试,就自己在PC端搭建了一套和公司集群一样的模板,因为公司的业务模块的测试有单独的服务器(这一块还是我很稀罕的),但是,第 ...
- 【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 ...
- Dockerfile指令及docker的常用命令
DockerfileFROM: FROM <image> FROM <image>:<tag> MAINTAINER: MAINTAINER <name> ...
- 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 ...
- K8s常用命令操作
K8s常用命令操作 一.kubectl命令补全 1.master安装命令补全,并临时生效 yum install -y bash-completion source /usr/share/bash-c ...
随机推荐
- Windows SQL Server 2012 R2 安装Intel I217-V/I218-V网卡驱动(转)
1.下载Intel官方驱动: https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=23071&lang=zh ...
- dpkg, APT, aptitude常用命令
Install dpkg --install, -i [deb] apt-get install [package] aptitude install [package] Remove dpkg -- ...
- 贝叶斯网络基础(Probabilistic Graphical Models)
本篇博客是Daphne Koller课程Probabilistic Graphical Models(PGM)的学习笔记. 概率图模型是一类用图形模式表达基于概率相关关系的模型的总称.概率图模型共分为 ...
- .Net之垃圾回收算法
垃圾回收器检测托管堆中是否有应用程序不在使用的任何对象,如果一次垃圾回收之后,堆栈没有可用的内存,new操作符将会抛出OutOfMemoryException(内存溢出). 每一个应用程序都包含一组根 ...
- phpstorm 设置多项目并存
phpstorm 或 webstorm 设置多个项目可以并存: File -> settings -> Directories -> Add Content Root 中添加你当前的 ...
- 也谈js函数节流
1.什么是js函数节流 其本质就是不让某些代码(函数)在没有间断的情况下连续重复执行,目的就是让执行函数的请求停止了一段时间后才执行. 2.函数节流运用的场景 窗口大小的改变(resize事件),滚动 ...
- 【原】YUI3:js加载过程及时序问题
时序问题在javascript中比较常见,尤其是在网络环境不稳定时以及某些浏览器本来版本中比较多,遇到此类问题,往往会使开发者非常头痛,问题的重现需要特定的环境,是偶发的,不容易重现.对于有经验的开发 ...
- ecshop使用Google API及OAuth2.0登录授权(PHP)
一.申请clientID https://console.developers.google.com/project 二.开启Google+ API权限 https://console.develop ...
- 国标电表DLT645转MODBUS TCP协议转换器MRD-5021,工业设备,浪涌三级保护MRD
DL/T645转ModbusTcp协议转换器 MRD-5021具有1 路RS485及1路以太网接口,最多支持同时采集5个DL/T645-1997或者5个2007协议国标电表设备,支持DL/T645协议 ...
- web编码(转)
问题2.浏览器编码方式是根据“响应标头-response header”中的键为“Content-Type”的值来自动选择判断,而不会简单的根据你在html中看到的标签值<meta http-e ...