Docker change directory
https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169/2
How do I change the Docker image installation directory?
You can change Docker's storage base directory (where container and images go) using the -g option when starting the Docker daemon.
Ubuntu/Debian: edit your
/etc/default/dockerfile with the -g option:DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4 -g /mnt"Fedora/Centos: edit
/etc/sysconfig/docker, and add the -g option in the other_args variable: ex.other_args="-g /var/lib/testdir". If there's more than one option, make sure you enclose them in " ". After a restart, (service docker restart) Docker should use the new directory.
Using a symlink is another method to change image storage.
Caution - These steps depend on your current /var/lib/docker being an actual directory (not a symlink to another location).
1) Stop docker: service docker stop. Verify no docker process is running ps faux
2) Double check docker really isn't running. Take a look at the current docker directory: ls /var/lib/docker/
2b) Make a backup - tar -zcC /var/lib docker > /mnt/pd0/var_lib_docker-backup-$(date +%s).tar.gz
3) Move the /var/lib/docker directory to your new partition: mv /var/lib/docker /mnt/pd0/docker
4) Make a symlink: ln -s /mnt/pd0/docker /var/lib/docker
5) Take a peek at the directory structure to make sure it looks like it did before the mv: ls /var/lib/docker/ (note the trailing slash to resolve the symlink)
6) Start docker back up service docker start
7) restart your containers
Docker change directory的更多相关文章
- 【linux】 解决linux下vsftp 500 OOPS: cannot change directory:/home/ftp/ 办法
用FileZilla连接ftp出现错误,500 OOPS: cannot change directory:/home/ftp 原因是CentOS系统安装了SELinux,因为默认下是没有开启FTP的 ...
- Linux vsftpd 无法登录 cannot change directory:xxx priv_sock_get_cmd 问题
配置vsftpd时本地用户无法切换不能登录问题.问题如下: C:\Users\kai>ftp ftp> open 172.24.144.10 连接到 172.24.144.10. (vsF ...
- 不关闭seLinux解决vsftpd服务本地用户不能登录问题(500 OOPS: cannot change directory:/home/***
这里不讲vsftpd的基本配置,网上教程已经太多了.这里只说seLinux的问题. 日前在CentOS6.5中安装了vsftpd,按照网上搜索的教程,配置好/etc/vsftpd/vsftpd.con ...
- 500 OOPS: cannot change directory:/home/test
问题: 以root 从远程客户端 登录 FTP 一直密码错误. 发现不能以root 登录, 需要创建其它的用户. 创建一个test 用户后(如下): useradd test; passwd ...
- 关于ftp用户连接时出现500 OOPS: cannot change directory的解决办法
RHEL5 中配置好后,今天想在XP下用ftp连接虚拟机中的linux,但ftp连接的时候会出现 "500 OOPS:cannot change directory:/root" ...
- 【linux】——FTP出现500 OOPS: cannot change directory的解决方法
cannot change directory:/home/*** ftp服务器连接失败,错误提示: 500 OOPS: cannot change directory:/home/******* 5 ...
- centos vsftp 500 OOPS: cannot change directory:/home/ftp
系统是CentOS,是RH派系的.我把vsftpd安装配置好了,以为大功告成,但客户端访问提示如下错误:500 OOPS: cannot change directory:/home/ftp原因是他的 ...
- rmmod: can't change directory to '/lib/modules': No such file or directory
[root@iTOP-4412]# mount /dev/sda1 /mnt/udisk/ [root@iTOP-4412]# insmod /mnt/udisk/linux/hello.ko [ ...
- su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
一.查看主目录权限对不对 1:问题描述 [root@ser6-52 ~]# su - mongodb su: warning: cannot change directory to /home/mon ...
随机推荐
- ContentProvider备份短信,以xml文件存储
因为短信的内容已经通过ContentProvider暴露出来,所以我们可以直接用内容解析者获取短信内容. 想要获取短信内容,你需要知道的一些东西: 1.Uri uri = Uri.parse(&quo ...
- Service之来电监听(失败的案例)
Service:服务,可以理解成一个运行再后台没有界面的Activity,集成于Seriver,是四大组件之一 Service的继承关系:Service-->ContextWrapper--&g ...
- Beta--项目冲刺第六天
胜利在望-- 队伍:F4 成员:031302301 毕容甲 031302302 蔡逸轩 031302430 肖阳 031302418 黄彦宁 会议内容: 1.站立式会议照片: 2.项目燃尽图 3.冲刺 ...
- 天气预报API获取
1.citycode: http://mobile.weather.com.cn/js/citylist.xml http://files.cnblogs.com/files/ys-wuhan/cit ...
- [Google Guava]学习--缓存cache
适用性 缓存在很多情况下非常实用.例如,计算或检索一个值的代价很高,并且对同样的输入需要不止一次获取值的时候,就应当考虑使用缓存. Guava Cache与ConcurrentMap很相似,但也不完全 ...
- colpick-jQuery颜色选择器使用说明
一.demo及下载网址:http://www.htmleaf.com/jQuery/Color-Picker/20141108417.html 二.使用效果 三.使用方法 1.引入js和c ...
- Boundary Representations
用所有属于boundary的点来表示boundary, 有两个主要的缺点, 一是数据量大, 二是对噪声敏感. 用boundary的一些representation而非精确的boundary本身来表示b ...
- ES6新特性:Javascript中的Reflect对象
Reflect介绍: Reflect这个对象在我的node(v4.4.3)中还没有实现, babel(6.7.7)也没有实现 ,新版本的chrome是支持的, ff比较早就支持Proxy和Reflec ...
- nodeJS+express+Jade写一个局域网聊天应用(node基础)
为了复习一下nodeJS, 而且socketIO这东西听起来就好高端有木有, 而且有人写过了open, 也可以作为自己的参考有木有, 点击下载源代码: express是4.x的版本, 跟以前的配置有些 ...
- ps还能用脚本切片?
最近在慕课网上看有关于ps切图的视频,发现ps 切片的水还挺深的.这相当于我的一篇学习笔记吧.对于ps的基本切图我觉得对于前端人员来说就是a piece of cake.但是对于ps的精准切图,我不知 ...