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 ...
随机推荐
- Bootstrap系列 -- 44. 分页导航
带页码的分页导航,可能是最常见的一种分页导航,特别是在列表页内容超多的时候,会给用户提供分页的导航方式.平时很多同学喜欢用div>a和div>span结构来制作带页码的分页导航.不过,在B ...
- springmvc整合fastjson
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- MVC认知路【点点滴滴支离破碎】【五】----form表单上传单个文件
//个人理解:前台一个form加input[type='file'],在加一个submit的按钮 主要设置form的action,method,enctype='multipart/form-data ...
- The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path。
项目上右键-->Build Path-->Configuration Build Path -->Add Library -->Server Runtime 选择tomcat
- ElasticSearch入门系列(六)分布式操作
一.路由文档到分片 当你索引一个文档的时候,他被存储在单独一个主分片上.Elasticsearch根据一个算法来找到所在分片上. shard=hash(routing)%number_of_prima ...
- Beta--项目冲刺第六天
胜利在望-- 队伍:F4 成员:031302301 毕容甲 031302302 蔡逸轩 031302430 肖阳 031302418 黄彦宁 会议内容: 1.站立式会议照片: 2.项目燃尽图 3.冲刺 ...
- HttpWebRequest提交(Post)数据
protected void Page_Load(object sender, EventArgs e) { string sql = "select top 1 * from [user] ...
- 如何用linux命令查看nginx是否在正常运行
有时想知道nigix是否在正常运行,需要用linux命令查看nginx运行情况. 执行命令: ps -A | grep nginx 如果返回结果的话,说明有nginx在运行,服务已经启动. 如果 ...
- 检测当前网段哪些IP是在线的
[root@storage ~]# cat ping.ip #!/bin/bashfor ip in `seq 1 255` do { ping -c 2 192.168.220 ...
- javascript 对象实例
创建对象: var o = new Objct(); //创建一个空对象 var o = {}; var a = new Array(); //创建一个空数组 var a = []; var d = ...