懒人版一键快速安装docker(20240415更新)

本文最后更新于 627 天前, 如有失效请评论区留言.

安装并配置

curl -fsSL https://c.ysicing.net/oss/scripts/docker.sh | bash
curl -fsSL https://c.ysicing.net/oss/scripts/dockerconfig.sh | bash

做了如下设置

{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": ["https://https://h.ysicing.net"],
  "bip": "169.254.0.1/24",
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "30m",
    "max-file": "2"
  },
  "storage-driver": "overlay2"
}

安装tools

docker run --rm -v /usr/local/bin:/sysdir ysicing/tools tar zxf /pkg.tgz -C /sysdir

内置了

helminit
docker-compose
ctop
cclear (清理退出容器)
din (进入容器 din <cname/>cid> ash/bash(默认)/sh)
dps (容器状态)
upgrade-tools // 升级二进制

源码可以参见 ysicing/tools

Sponsor

Like this article? $1 reward

Comments