Access docker registry from client PC via http

environment

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
$ docker -v
Docker version 20.10.1, build 831ebea

procedure

Create /etc/docker/daemon.json and specify registry

daemon.json


{ "insecure-registries": [ "192.168.1.1:5000" ] }

docker restart

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

A little stumbled

Contents

Even if insercure-registries is described in /etc/docker/daemon.json, it is not reflected.

Solution

daemon.json Because there was a space between "" "and": "

# OK
{ "insecure-registries": [ "192.168.1.1:5000" ] }

# NG
{ "insecure-registries" : [ "192.168.1.1:5000" ] }

Other

Once set, it can be reflected even if there is a blank

reference

https://python5.com/q/desfwrhm

Recommended Posts

Access docker registry from client PC via http
Push Docker images from GitHub Actions to GitHub Container Registry