赞
踩
用于快速配置docker国内镜像,和自定义的docker存储路径。
- sudo mkdir -p /etc/docker
- sudo tee /etc/docker/daemon.json <<-'EOF'
- {
- "registry-mirrors": ["https://dockerproxy.com","https://docker.mirrors.ustc.edu.cn","https://docker.nju.edu.cn"],
- "log-opts": {
- "max-size": "5m",
- "max-file":"3"
- },
- "exec-opts": ["native.cgroupdriver=systemd"]
- }
- EOF
-
- sudo systemctl daemon-reload
- sudo systemctl restart docker
- sudo mkdir -p /etc/docker
- sudo tee /etc/docker/daemon.json <<-'EOF'
- {
- "registry-mirrors": ["https://dockerproxy.com","https://docker.mirrors.ustc.edu.cn","https://docker.nju.edu.cn"],
- "data-root": "/home/admin/docker",
- "log-opts": {
- "max-size": "5m",
- "max-file":"3"
- },
- "exec-opts": ["native.cgroupdriver=systemd"]
- }
- EOF
-
- sudo systemctl daemon-reload
- sudo systemctl restart docker
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。