ubuntu 16.04 改变docker镜像位置,亲测有效

参考: https://www.cnblogs.com/whmbky/p/7843580.html

系统Ubuntu 16.04
docker info如下

...
Server Version: 18.05.0-ce
...

以下亲测有效:
vim /etc/default/docker

# Docker Upstart and SysVinit configuration file

#
# THIS FILE DOES NOT APPLY TO SYSTEMD
#
#   Please see the documentation for "systemd drop-ins":
#   https://docs.docker.com/engine/admin/systemd/
#

# Customize location of Docker binary (especially for development testing).
#DOCKERD="/usr/local/bin/dockerd"

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export DOCKER_TMPDIR="/mnt/bigdrive/docker-tmp"

i,在最后添加
DOCKER_OPTS=--graph="/vdb1/docker"
Esc
输入:wq保存

service docker stop
service docker start

展开阅读全文

没有更多推荐了,返回首页