在国内如果没拉专线大部分都是很慢很慢, 无法正常使用docker, 但是我们可以通过镜像地址来减轻这种现象。

配置信息(/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"
#阿里云镜像
DOCKER_OPTS="--registry-mirror=https://4xle30hc.mirror.aliyuncs.com"
#官方中国镜像
#DOCKER_OPTS="--registry-mirror=https://registry.docker-cn.com"
#163镜像
#DOCKER_OPTS="--registry-mirror=http://hub-mirror.c.163.com"

# 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"

修改配置后请重启docker服务:

sudo service docker restart

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注