docker命令

asn@asn-vm:~/Desktop$ sudo docker images -hlinux

 

Usage: docker images [OPTIONS] [REPOSITORY]docker

 

List imagesjson

 

docker images -a 顯示全部鏡像,包括中間鏡像api

-a, --all=false Show all images (default hides intermediate images)服務器

 

docker images --digests 顯示摘要cors

--digests=false Show digestsdom

-f, --filter=[] Filter output based on conditions provided 基於提供的條件過濾輸出結果socket

--help=false Print usageide

--no-trunc=false Don't truncate outputoop

-q, --quiet=false Only show numeric IDs

 

 

 

asn@asn-vm:~/Desktop$ sudo docker -h

Usage: docker [OPTIONS] COMMAND [arg...]

 

A self-sufficient runtime for linux containers.

 

Options:

 

--api-cors-header= Set CORS headers in the remote API

-b, --bridge= Attach containers to a network bridge

--bip= Specify network bridge IP

-D, --debug=false Enable debug mode

-d, --daemon=false Enable daemon mode

--default-gateway= Container default gateway IPv4 address

--default-gateway-v6= Container default gateway IPv6 address

--default-ulimit=[] Set default ulimits for containers

--dns=[] DNS server to use

--dns-search=[] DNS search domains to use

-e, --exec-driver=native Exec driver to use

--exec-opt=[] Set exec driver options

--exec-root=/var/run/docker Root of the Docker execdriver

--fixed-cidr= IPv4 subnet for fixed IPs

--fixed-cidr-v6= IPv6 subnet for fixed IPs

-G, --group=docker Group for the unix socket

-g, --graph=/var/lib/docker Root of the Docker runtime

-H, --host=[] Daemon socket(s) to connect to

-h, --help=false Print usage

--icc=true Enable inter-container communication

--insecure-registry=[] Enable insecure registry communication

--ip=0.0.0.0 Default IP when binding container ports

--ip-forward=true Enable net.ipv4.ip_forward

--ip-masq=true Enable IP masquerading

--iptables=true Enable addition of iptables rules

--ipv6=false Enable IPv6 networking

-l, --log-level=info Set the logging level

--label=[] Set key=value labels to the daemon

--log-driver=json-file Default driver for container logs

--log-opt=map[] Set log driver options

--mtu=0 Set the containers network MTU

-p, --pidfile=/var/run/docker.pid Path to use for daemon PID file

--registry-mirror=[] Preferred Docker registry mirror

-s, --storage-driver= Storage driver to use

--selinux-enabled=false Enable selinux support

--storage-opt=[] Set storage driver options

--tls=false Use TLS; implied by --tlsverify

--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA

--tlscert=~/.docker/cert.pem Path to TLS certificate file

--tlskey=~/.docker/key.pem Path to TLS key file

--tlsverify=false Use TLS and verify the remote

--userland-proxy=true Use userland proxy for loopback traffic

-v, --version=false Print version information and quit

 

Commands:

attach Attach to a running container

build Build an image from a Dockerfile --- 從dockfile構建一個鏡像

commit Create a new image from a container's changes --- 從容器的更改中建立一個新的鏡像

 

cp Copy files/folders from a container's filesystem to the host path 從容器的文件系統中拷貝文件、文件夾到主機路徑

 

create Create a new container    --- 建立一個新的容器

diff Inspect changes on a container's filesystem --- 在一個容器的文件系統上檢測更改

events Get real time events from the server --- 從服務器獲取一個實時的事件

exec Run a command in a running container 在運行的容器中運行一個命令

 

export Stream the contents of a container as a tar archive --- 把一個容器的內容做爲一個tar包導出

history Show the history of an image

 

images List images --- 列出鏡像

 

import Create a new filesystem image from the contents of a tarball

 

info Display system-wide information

 

inspect Return low-level information on a container or image

 

kill Kill a running container -- kill掉一個正在運行的容器

 

load Load an image from a tar archive -- 從tar包中加載一個鏡像

 

login Register or log in to a Docker registry server -- 登陸Docker註冊表服務器

 

logout Log out from a Docker registry server --- 從Docker註冊表服務器中註銷

 

logs Fetch the logs of a container --- 獲取一個容器的日誌

 

pause Pause all processes within a container 在一個容器中,停掉全部的線程

 

port Lookup the public-facing port that is NAT-ed to PRIVATE_PORT 查詢一個面向公衆的端口(對應一個私有的端口)

 

ps List containers

 

pull Pull an image or a repository from a Docker registry server 從Docker註冊服務器中拉取一個鏡像

push Push an image or a repository to a Docker registry server -- 把一個鏡像推送到Docker註冊服務器中

 

rename Rename an existing container -- 重命名一個已有的容器

restart Restart a running container

 

rm Remove one or more containers -- 移除一個或多個容器

rmi Remove one or more images     -- 移除一個或多個鏡像

 

run Run a command in a new container -- 在一個新容器中,運行一個命令

 

save Save an image to a tar archive -- 把鏡像保持到一個tar文件包

 

search Search for an image on the Docker Hub --- 在DockerHub上搜索某個鏡像

 

start Start a stopped container

 

stats Display a stream of a containers' resource usage statistics -- 顯示一個容器資源的使用統計信息

 

stop Stop a running container

 

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

 

Run 'docker COMMAND --help' for more information on a command.

相關文章
相關標籤/搜索