LoginSignup
10
7

More than 5 years have passed since last update.

プライベートDocker-Registryにhttpで接続 [Docker-ce Linux]

Last updated at Posted at 2018-03-09

環境

CentOS 7.4.1708
docker-ce.x86_64 17.12.1.ce-1.el7.centos @docker-ce-stable
docker-distribution.x86_64 2.6.2-1.git48294d9.el7 @extras


対象のプライベートDocker-Registry

my-docker-registry:5000
とした場合


設定

daemon.jsonを作る。

/etc/docker/daemon.json
{
 "insecure-registries": ["my-docker-registry:5000"]
}

確認

適当なDockerfileでbuildしてみる。

$ sudo systemctl restart docker
$ sudo docker build -t test .
Sending build context to Docker daemon  8.192kB
Step 1/2 : FROM my-docker-registry:5000/centos:7.4.1708
7.4.1708: Pulling from centos
6fd64836e300: Extracting [================================>                  ]  47.35MB/73.36MB

http: server gave HTTP response to HTTPS client
て怒られなくなった:sunny:

参考:Daemon CLI(dockerd)-Stable

10
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
7