官网地址:https://download.docker.com/linux/static/stable/x86_64/
百度云:链接:https://pan.baidu.com/s/1uYpkGh0TdlIvLbCNDPC8dg
提取码:cgkg
[root@localhost docker]# ll
总用量 59308
-rw-r--r--. 1 root root 60730088 4月 25 11:33 docker-19.03.9.tgz
[root@localhost docker]# tar -xzvf docker-19.03.9.tgz
docker/
docker/docker-init
docker/runc
docker/docker
docker/docker-proxy
docker/containerd
docker/ctr
docker/dockerd
docker/containerd-shim
[root@localhost docker]#
[root@master dockeranzhuangbao]# tar zxf docker-19.03.9.tgz
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]# sudo cp docker/* /usr/bin/
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]# sudo dockerd &
[1] 9521
[root@master dockeranzhuangbao]# INFO[2023-04-26T11:26:18.926484999+08:00] Starting up
WARN[2023-04-26T11:26:18.932404676+08:00] could not change group /var/run/docker.sock to docker: group docker not found
INFO[2023-04-26T11:26:18.937216663+08:00] libcontainerd: started new containerd process pid=9532
INFO[2023-04-26T11:26:18.937339268+08:00] parsed scheme: "unix" module=grpc
INFO[2023-04-26T11:26:18.937357167+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2023-04-26T11:26:18.937412457+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc
INFO[2023-04-26T11:26:18.937433022+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2023-04-26T11:26:19.245038524+08:00] starting containerd revision=7ad184331fa3e55e52b890ea95e65ba581ae3429 version=v1.2.13
INFO[2023-04-26T11:26:19.245514891+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2023-04-26T11:26:19.245706777+08:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
WARN[2023-04-26T11:26:19.246044527+08:00] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
INFO[2023-04-26T11:26:19.246121500+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
WARN[2023-04-26T11:26:19.248632298+08:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.\n": exit status 1"
INFO[2023-04-26T11:26:19.248705598+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2023-04-26T11:26:19.248840355+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2023-04-26T11:26:19.249045209+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2023-04-26T11:26:19.249615803+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2023-04-26T11:26:19.249675256+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2023-04-26T11:26:19.249752611+08:00] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.\n": exit status 1"
WARN[2023-04-26T11:26:19.249771533+08:00] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
WARN[2023-04-26T11:26:19.249781478+08:00] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
INFO[2023-04-26T11:26:19.256406045+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2023-04-26T11:26:19.256473179+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2023-04-26T11:26:19.266085617+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.266470957+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267178406+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267283996+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267492343+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267548586+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267576889+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.267601774+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2023-04-26T11:26:19.267788528+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2023-04-26T11:26:19.267977030+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2023-04-26T11:26:19.268569522+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2023-04-26T11:26:19.268604885+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2023-04-26T11:26:19.268648109+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268663883+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268679589+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268693205+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268705715+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268718699+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268731294+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268743261+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268754482+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2023-04-26T11:26:19.268877650+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268897153+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268910922+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.268923211+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2023-04-26T11:26:19.269143863+08:00] serving... address="/var/run/docker/containerd/containerd-debug.sock"
INFO[2023-04-26T11:26:19.269184371+08:00] serving... address="/var/run/docker/containerd/containerd.sock"
INFO[2023-04-26T11:26:19.269196820+08:00] containerd successfully booted in 0.025515s
INFO[2023-04-26T11:26:19.371786455+08:00] parsed scheme: "unix" module=grpc
INFO[2023-04-26T11:26:19.371876982+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2023-04-26T11:26:19.371907465+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc
INFO[2023-04-26T11:26:19.371920206+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2023-04-26T11:26:19.373702120+08:00] parsed scheme: "unix" module=grpc
INFO[2023-04-26T11:26:19.373757302+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2023-04-26T11:26:19.373778679+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc
INFO[2023-04-26T11:26:19.373788560+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2023-04-26T11:26:19.443558871+08:00] Loading containers: start.
INFO[2023-04-26T11:26:19.714531363+08:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2023-04-26T11:26:19.866495901+08:00] Loading containers: done.
INFO[2023-04-26T11:26:19.977605770+08:00] Docker daemon commit=9d988398e7 graphdriver(s)=overlay2 version=19.03.9
INFO[2023-04-26T11:26:19.977754709+08:00] Daemon has completed initialization
INFO[2023-04-26T11:26:20.009263827+08:00] API listen on /var/run/docker.sock
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]# docker info
Client:
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.9
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.5-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.923GiB
Name: master
ID: C7EB:LYYW:AQCO:SDLT:VM6L:HAUG:A5OI:U6VK:IZCC:X7P6:VFT7:7KM5
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]# ps -ef | grep docker
root 9521 1328 0 11:26 pts/0 00:00:00 sudo dockerd
root 9522 9521 0 11:26 pts/0 00:00:02 dockerd
root 9532 9522 1 11:26 ? 00:00:04 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
root 13949 1328 0 11:31 pts/0 00:00:00 grep --color=auto docker
[root@master dockeranzhuangbao]# kill -9 9521 9522 9532
[root@master dockeranzhuangbao]#
[1]+ 已杀死 sudo dockerd
[root@master dockeranzhuangbao]# ps -ef | grep docker
root 14362 1328 0 11:31 pts/0 00:00:00 grep --color=auto docker
[root@master dockeranzhuangbao]#
[root@master dockeranzhuangbao]# more /usr/lib/systemd/system/docker.service #创建docker系统服务文件
#这是docker注册系统服务的问价内容
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
systemctl start/stop docker
systemctl enable/disable docker