开发者学堂课程【深入解析 Docker 容器化技术:Docker 命令帮助文档】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/659/detail/10933
Docker 命令帮助文档
内容介绍:
一、Docker 命令介绍
一、Docker 命令介绍
在操作 docker 的过程当中,是通过命令来进行操作,docker 命令有哪些?,可以查看帮助文档
在控制台输入 docker version
[root@localhost ~]# docker version
Client: Docker Engine - Community
version:
19.03.2
API version: 1.40
GO version:
go1.12.8
Git commit : 6a30dfc
Built :
Thu AUg 29 05:28:55 2019
OS/Arch:
linux/ amd64
Experiment al :
false
Server: Docker Engine 一Community
Engine :
version:
19.03.2
API version:
1.40 (minimum version 1.12)
GO version:
gol.12.8
Git. commit :
6a30dfc
Built :
Thu Aug 29 05:27 :34 2019
OS/Arch:
linux/ amd64
Experimental :
false
containerd:
Version:
1.2.6
Gitcommit : 894 b81 a4 b802e4 eb2a91 d1ce216b8817763c29fb
runc:
version:
1.0.0-rc8
Gitcommit:425e105d5 a03f abd7 37 a1 26ad93d62 a9eeede87f
docker-init :
version:
0.18.0
GitCommit:
fec3683
这个 docker 整体架构是一个 C/S 架构,有版本信息,开发语言的版本。通过命令操作 docker,有哪些命令,通过docker help 查询
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 fi lesystem
create
create a new container
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 fi lesystem image
info
Display system-wide information
inspect
Return low-level information on Docker objects
kill
Kill one or more running containers
load
Load an i mage 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 container S
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 i mages
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 mor e containers
update
update conf igur at ion of one or more containens
version
show the Docker version information
wait
Block until one or more containers stop, then print their exit codes
这些都是命令,并且还有命令的说明。管理类的命令,命令后也有对命令的介绍,这些都是操作 docker 的命令。
Management Commands :
bu
i
lder manage builds
config
Manage Docker configs
container Manage container
s
context
Manage contexts
engine
manage the docker engine
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
trust
Manage trust on Docker i mages
vol
ume
manage Vo
l
umes