惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - Hex

大辉谈-备战双十一之动静分离实战 [知识库:python-tornado]异步调用中的上下文控制Tornado stack context 在 CentOS 下手工安装 Docker v1.1x Docker学习记录3: 搭建 Private Registry - Hex [原创]Docker学习记录: Shipyard+Swarm+Consul+Service Discover 搭建教程 解决mac OS 10.9 下python 在terminal下崩溃的问题 ssh连接失败, 记下来原因和解决方案 centos+nginx+redmine+gitosis安装指南 面向对象控与python内存泄漏 python 之禅:import this 新头衔:热酷高级python软件工程师,你问我去热酷干嘛? 使用AuthToken架构保护用户帐号验证Cookie的安全性 热酷,新的领域,新的发展 恩,终于有我自己的时间整理下这两年的思路了 [思想火花]:函数命名及参数 MouseOut和RollOut的区别 关于VS2008单元测试中加载配置文件的问题 竟然遇到取FormAuthentication的值取不出来的情况 实现一个Ajax模式的文件上传功能有多难?
Docker: 如何修改 Docker 的镜像存储位置
Hex · 2016-07-19 · via 博客园 - Hex

我用的阿里云的服务器, 但是系统盘只有20G, 默认 Docker 的镜像文件是安装在/var/lib 目录下的, 这样的话我根本装不了太多的镜像... 这个必须得改改...
搜了下, 解决方案如下:

方案1, 使用参数-g 来修改 Docker 的镜像存储文件夹.

修改方法如下:
在 Ubuntu/Debian 系统下:
编辑 /etc/default/docker 文件, 添加-g 参数的设置, 如下:

DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4 -g /mnt"

在 Fedora/Centos 系统下:

编辑 /etc/sysconfig/docker 文件, 添加-g 参数的设置, 如下:

other_args="-g /mnt"

重启 Docker 服务, 问题就解决了.

方案2 使用链接

  1. 停止 Docker: service docker stop.
  2. 做个备份 tar -zcC /var/lib/docker > /mnt/var_lib_docker-backup-$(date + %s).tar.gz
  3. 迁移/var/lib/docker目录到met 目录下: mv /var/lib/docker /mnt/docker
  4. 建个 symlink: ln -s /mnt/docker /var/lib/docker
  5. 确认文件夹类型为symlink 类型 ls /var/lib/docker
  6. 启动 docker service.