二进制Docker

基础 0 1688
SPORE
SPORE 2025-02-23 00:00

(1)准备 Docker CE 二进制包 wget -c https://download.docker.com/linux/static/stable/x86_64/docker-20.10.21.tgz 

(2)解压 root用户操作: 

tar -zxvf docker-20.10.21.tgz 改变权限: chown root:root docker/*   解压后的文件如下: 

    [root@Node01 ~]# ll docker/* -rwxr-xr-x. 1 root root 38995448 Oct 26 02:03 docker/containerd -rwxr-xr-x. 1 root root 7446528 Oct 26 02:03 docker/containerd-shim -rwxr-xr-x. 1 root root 9646080 Oct 26 02:03 docker/containerd-shim-runc-v2 -rwxr-xr-x. 1 root root 20750336 Oct 26 02:03 docker/ctr -rwxr-xr-x. 1 root root 48047088 Oct 26 02:03 docker/docker -rwxr-xr-x. 1 root root 57789848 Oct 26 02:03 docker/dockerd -rwxr-xr-x. 1 root root 765808 Oct 26 02:03 docker/docker-init -rwxr-xr-x. 1 root root 2555160 Oct 26 02:03 docker/docker-proxy -rwxr-xr-x. 1 root root 13847864 Oct 26 02:03 docker/runc 

(3)复制二进制文件 将解压后的二进制文件复制到目录“/usr/bin”下: cp -p docker/* /usr/bin

 说明:参数-p保持原来的属性。 

(4)创建 执行以下命令创建用户组: groupadd docker 

(5)检查命令是否生效 执行以下命令查看版本: docker version 参考结果: Client: Version: 20.10.21 API version: 1.41 Go version: go1.18.7 Git commit: baeda1f Built: Tue Oct 25 17:56:30 2022 OS/Arch: linux/amd64 Context: default Experimental: true Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 

(6)配置相关服务文件 参考文件:docker.socket、 containerd.service、 docker.service 6.1 docker.socket tee /usr/lib/systemd/system/docker.socket <

回帖
  • 消灭零回复
本周热议
没有相关数据