docker 常見命令翻譯

docker常見命令:
Management Commands:
builder Manage builds 管理構建

config Manage Docker configs 管理Docker配置
  create Create a config from a file or STDIN
  從文件或STDIN建立配置
  inspect Display detailed information on one or more configs
  顯示一個或多個配置的詳細信息
  ls List configs
  列出配置
  rm Remove one or more configs
  刪除一個或多個配置node

container Manage containers 管理容器
attach Attach local standard input, output, and error streams to a running container
將本地標準輸入、輸出和錯誤流附加到正在運行的容器上
commit Create a new image from a container's changes
根據容器的更改建立新映像
cp Copy files/folders between a container and the local filesystem
在容器和本地文件系統之間複製文件/文件夾
create Create a new container
建立新的容器
diff Inspect changes to files or directories on a container's filesystem
檢查容器文件系統上文件或目錄的更改
exec Run a command in a running container
在運行的容器中運行命令
export Export a container's filesystem as a tar archive
將容器的文件系統導出爲tar存檔
inspect Display detailed information on one or more containers
在一個或多個容器上顯示詳細信息
kill Kill one or more running containers
殺死正在運行中的容器
logs Fetch the logs of a container
docker container logs ID 查看運行歷史記錄
ls List containers
查看運行中的容器
-a 退出中的容器
pause Pause all processes within one or more containers
暫停一個或多個容器中的全部進程
port List port mappings or a specific mapping for the container
docker container port ID 查看全部映射的端口
prune Remove all stopped containers
移除全部已中止的容器
rename Rename a container
重命名容器
restart Restart one or more containers
重啓容器
rm Remove one or more containers
docker container rm ID 刪除容器
-f 強制刪除運行中的容器
run Run a command in a new container
docker container run [選項][鏡像名] [shell命令][參數]
-a, - attach list附加到STDIN,STDOUT或STDERR
-c, - cpu-shares int CPU份額(相對權重)
-d, - detach在後臺運行容器並打印容器ID
-e, - env list設置環境變量
-h, - hostname string容器主機名
-i, - interactive儘管未鏈接,仍保持STDIN打開
-l, - label列表在容器上設置元數據
-m, - memory bytes內存限制
-p, - 發佈列表將容器的端口發佈到主機
-P, - publish-all將全部公開的端口發佈到隨機端口
-t, - try分配僞TTY
-u, - user string用戶名或UID(格式:
-v, - volume list綁定裝入卷
-w, - workdir string容器內的工做目錄
start Start one or more stopped containers
啓動容器
stats Display a live stream of container(s) resource usage statistics
顯示容器資源使用狀況統計信息的實時流
stop Stop one or more running containers
docker container stop ID 中止容器
top Display the running processes of a container
docker container top ID 肯定Docker容器的進程
unpause Unpause all processes within one or more containers
恢復容器中全部的進程
update Update configuration of one or more containers
更新一個或多個容器的配置
wait Block until one or more containers stop, then print their exit codesdocker

engine Manage the docker engine 管理Docker引擎
activate Activate Enterprise Edition
激活企業版
check Check for available engine updates
檢查可用的引擎更新
update Update a local engine
升級引擎shell

image Manage images
build Build an image from a Dockerfile
從Dockerfile構建映像
history Show the history of an image
顯示鏡像的歷史記錄
import Import the contents from a tarball to create a filesystem image
從tarball導入內容以建立文件系統映像
inspect Display detailed information on one or more images
顯示一個或多個鏡像的詳細信息
load Load an image from a tar archive or STDIN
docker image load < Path/name.tar.gz 導入鏡像
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
刪除鏡像
-f 強制刪除
--no-prune 不要刪除未標記的parents
save Save one or more images to a tar archive (streamed to STDOUT by default)
docker image save name >Path/name.tar.gz 打包保存鏡像
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
建立一個引用SOURCE_IMAGE的標記TARGET_IMAGE

network Manage networks
connect Connect a container to a network
將容器鏈接到網絡
create Create a network
建立網絡
disconnect Disconnect a container from a network
斷開容器與網絡的鏈接
inspect Display detailed information on one or more networks
顯示一個或多個網絡的詳細信息
ls List networks
列出網絡
prune Remove all unused networks
刪除全部未使用的網絡
rm Remove one or more networks
刪除一個或多個網絡服務器

node Manage Swarm nodes
demote Demote one or more nodes from manager in the swarm
從集羣中的管理器降級一個或多個節點
inspect Display detailed information on one or more nodes
顯示一個或多個節點的詳細信息
ls List nodes in the swarm
列出swarm中的節點
promote Promote one or more nodes to manager in the swarm
將一個或多個節點提高爲集羣中的管理器
ps List tasks running on one or more nodes, defaults to current node
列出在一個或多個節點上運行的任務,默認爲當前節點
rm Remove one or more nodes from the swarm
從羣中刪除一個或多個節點
update Update a node
更新節點網絡

plugin Manage plugins
disable Disable a plugin
禁用插件
enable Enable a plugin
啓用插件
inspect Display detailed information on one or more plugins
顯示一個或多個插件的詳細信息
install Install a plugin
安裝插件
ls List plugins
列出插件
push Push a plugin to a registry
將插件推送到註冊表
rm Remove one or more plugins
刪除一個或者多個插件
set Change settings for a plugin
更改插件的設置
upgrade Upgrade an existing plugin
升級現有插件app

secret Manage Docker secrets
create Create a secret from a file or STDIN as content
建立密匙
inspect Display detailed information on one or more secrets
顯示一個或多個密匙的詳細信息
ls List secrets
列出密匙
rm Remove one or more secrets
刪除密匙

service Manage services
create Create a new service
建立新服務
inspect Display detailed information on one or more services
列出一個或者多個服務信息
logs Fetch the logs of a service or task
獲取服務或任務的日誌
ls List services
列出服務
ps List the tasks of one or more services
列出一個或多個服務的任務
rm Remove one or more services
刪除一個或多個服務
rollback Revert changes to a service's configuration
還原對服務配置的更改
scale Scale one or multiple replicated services
擴展一個或多個複製服務
update Update a service
升級服務ide

stack Manage Docker stacks 管理Docker棧
deploy Deploy a new stack or update an existing stack
部署新堆棧或更新現有堆棧
ls List stacks
列出堆棧
ps List the tasks in the stack
堆棧中的任務
rm Remove one or more stacks
刪除一個或者多個堆棧
services List the services in the stack
列出堆棧中的服務ui

swarm Manage Swarm
ca Display and rotate the root CA
顯示並循環根CA證書
init Initialize a swarm
初始化一個集羣
join Join a swarm as a node and/or manager
以節點或管理器的形式加入羣
join-token Manage join tokens
管理加入令牌
leave Leave the swarm
離開這個集羣
unlock Unlock swarm
解鎖集羣
unlock-key Manage the unlock key
管理解鎖鍵
update Update the swarm
更新集羣this

system Manage Docker 管理Docker
df Show docker disk usage
顯示docker磁盤使用狀況
events Get real time events from the server
從服務器獲取實時事件
-f, --filter filter Filter output based on conditions provided
根據提供的條件過濾輸出
--format string Format the output using the given Go template
使用給定的開始模板格式化輸出
--since string Show all events created since timestamp
顯示自時間戳以來建立的全部事件
--until string Stream events until this timestamp
顯示到時間戳的事件插件

info Display system-wide information
顯示整個系統的信息
prune Remove unused data
刪除未使用的數據

trust Manage trust on Docker images 管理Docker鏡像上的信任 volume Manage volumes 管理卷 create Create a volume 新建卷 inspect Display detailed information on one or more volumes 顯示一個或多個卷的詳細信息 ls List volumes 列出卷 prune Remove all unused local volumes 刪除全部未使用的卷 rm Remove one or more volumes 刪除一個或者多個卷

相關文章
相關標籤/搜索