請告訴我命令之間的差異docker container run
VS docker run
還什麼VS docker build
泊塢窗命令相當於
Q
泊塢窗命令相當於
0
A
回答
0
docker image build
之間的差別,如果你只是運行泊塢窗命令
$ docker
Usage: docker COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default "/Users/tarun.lalwani/.docker")
-D, --debug Enable debug mode
--help Print usage
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default "/Users/tarun.lalwani/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default "/Users/tarun.lalwani/.docker/cert.pem")
--tlskey string Path to TLS key file (default "/Users/tarun.lalwani/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Management Commands:
checkpoint Manage checkpoints
config Manage Docker configs
container Manage containers
image Manage images
network Manage networks
node Manage Swarm nodes
plugin Manage plugins
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage Swarm
system Manage Docker
volume Manage volumes
Commands:
attach Attach local standard input, output, and error streams to a running container
build Build an image from a Dockerfile
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
deploy Deploy a new stack or update an existing stack
diff Inspect changes to files or directories on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
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
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
wait Block until one or more containers stop, then print their exit codes
Run 'docker COMMAND --help' for more information on a command.
現在你有組像經理多個命令container
,image
。當你運行這個組
$ docker image
Usage: docker image COMMAND
Manage images
Options:
--help Print usage
Commands:
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 build
是一個別名docker container build
。 Docker最初都是關於一級命令的,後來團隊意識到他們需要一種將命令分組的方法,這就是爲什麼要保持它與舊的客戶端兼容的原因
0
Docker以前使用的命令如docker run
和docker build
運行容器或構建映像。在後來的版本中,他們覺得他們應該按照@ tarun-lalwani的建議指定並創建一個組,因此docker run
或docker container run
(它們只是彼此的別名)沒有區別。
相關問題
- 1. 泊塢窗exec命令
- 2. 在泊塢窗命令行
- 3. 「泊塢窗,撰寫」命令來設置泊塢窗,compose.yml文件
- 4. 泊塢窗命令失敗Cygwin中 - 泊塢窗服務達
- 5. 視窗CMD泊塢窗命令管道
- 6. 泊塢窗:無法運行命令泊塢
- 7. 泊塢入口點使用泊塢窗運行命令
- 8. mesos從未能EXCUTE泊塢窗命令
- 9. 泊塢窗tar命令不工作
- 10. 泊塢窗:更改目錄命令
- 11. 泊塢窗 - 擊:IP:找不到命令
- 12. 泊塢窗運行命令錯誤
- 13. 泊塢窗cp命令不允許
- 14. 泊塢窗運行centos6命令失敗
- 15. 泊塢窗 - 編輯「泊塢窗」文件
- 16. 泊塢窗:什麼是相當於傳統 - 鏈接參數
- 17. 從泊塢窗
- 18. 泊塢窗:頭
- 19. 內泊塢窗
- 20. 在泊塢窗
- 21. 在泊塢窗
- 22. 泊塢窗
- 23. 如何運行泊塢窗,構成對泊塢窗羣(不含泊塢窗機)
- 24. 泊塢窗機VS泊塢運行
- 25. 泊塢窗網絡
- 26. 泊塢窗 - PG :: ConnectionBad
- 27. 泊塢窗更新
- 28. 泊塢窗容器
- 29. 泊塢窗:在Ubuntu
- 30. 泊塢窗:在Dockerfile