docker二进制安装

docker 二进制安装 1.下载二进制压缩包 稳定版 wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.0.tgz 2.解压 tar zxvf docker-20.10.0.tgz 3.放进path cp docker/* /usr/bin 4.开启 docker daemon docker & 5.验证 docker run hello-world 6.加入service 二进制安装的docker 是不能直接用 systemctl start docker 等命令的,提示 docker.service找不到 那么直接加一个 https://github.com/moby/moby/blob/master/contrib/init/systemd/docker.service.rpm 新版的docker 只需要一个service 不需要socket vim /etc/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel....

February 20, 2021 · 1 分钟 · 赵文卓