标签:创建文件 release href http hat yum 加速 启动服务 添加
[root@Nexus3 ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@Nexus3 ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
Go version: go1.10.3
Git commit: 7f2769b/1.13.1
Built: Sun Sep 15 14:06:47 2019
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
Go version: go1.10.3
Git commit: 7f2769b/1.13.1
Built: Sun Sep 15 14:06:47 2019
OS/Arch: linux/amd64
Experimental: false
yum install -y docker
-----创建文件夹-------------------------
mkdir -p /etc/systemd/system/docker.service.d
-----修改配置文件-------------------------
cat > /etc/systemd/system/docker.service.d/http-proxy.conf <<'EOF'
[Service]
Environment="HTTP_PROXY=http://10.1.46.19:3128/"
EOF
cat > /etc/docker/daemon.json << 'EOF'
{
"registry-mirrors": [
"https://kfwkfulq.mirror.aliyuncs.com",
"https://2lqq34jg.mirror.aliyuncs.com",
"https://pee6w651.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
],
"dns": ["114.114.114.114","8.8.4.4"]
}
EOF
systemctl restart docker && systemctl enable docker
标签:创建文件 release href http hat yum 加速 启动服务 添加
原文地址:https://www.cnblogs.com/leoshi/p/12355515.html