Comments on: How to Setup Docker Private Registry on CentOS 7.x / RHEL 7.x https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/ Tue, 16 Feb 2021 14:06:48 +0000 hourly 1 By: Gary Murphy https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-22794 Tue, 16 Feb 2021 14:06:48 +0000 http://www.linuxtechi.com/?p=5138#comment-22794 I would recommend using:

systemctl edit docker.service

Instead of editing the service file directly. I added the following lines (the first ExecStart= clears out the default, or you will have two and the unit won’t start)
———————————————-
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock –insecure-registry docker.example.com:5000
———————————————–

You may also want to do ‘export SYSTEMD_EDITOR=vim’ if you don’t want nano.

]]>
By: Pradeep Kumar https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-13769 Sat, 24 Aug 2019 02:32:48 +0000 http://www.linuxtechi.com/?p=5138#comment-13769 In reply to InvisiBill.

You should allow port ‘5000’ in firewall as docker registry is running on 5000 port.

]]>
By: InvisiBill https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-13759 Fri, 23 Aug 2019 16:54:11 +0000 http://www.linuxtechi.com/?p=5138#comment-13759 I’m a little confused about the firewall command. Should we need to be opening up port 5000 instead of 80?

]]>
By: maddy https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-12390 Sat, 20 Jul 2019 20:31:46 +0000 http://www.linuxtechi.com/?p=5138#comment-12390 Pradeep,

how do we avoid docker push from trying to use a webproxy? in /etc/profile, I have explicitly set

export no_proxy=”localhost,127.0.0.1,node2,*.local.domain”

Yet when pushing image, docker tries to resolve the hostname through webproxy

[admin@node2 ~]# cat /etc/hosts
15.12.70.46 node2 node2

# docker push node2:5000/friendlyhello
The push refers to a repository [node2:5000/friendlyhello]
983860a985da: Preparing
fc5535ef2a0b: Preparing
0bd3f73f5940: Preparing
63d42cb10c64: Preparing
32d47307f796: Preparing
c86aa07d5fdb: Waiting
d8a33133e477: Waiting
Error: Status 404 trying to push repository friendlyhello: ….
“>\nYour requested host \”node2\” could not be resolved by DNS.\n\n\n\n\n\n\n\n\n\n\nFor assistance, contact your network support team.\n\n\n\n\n\n\n”

]]>
By: Pradeep Kumar https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-9277 Wed, 17 Apr 2019 00:36:24 +0000 http://www.linuxtechi.com/?p=5138#comment-9277 In reply to Vijay.

From any of the docker Engine node, run the “docker images” command to see the images inside your registry.

]]>
By: Vijay https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-9244 Tue, 16 Apr 2019 11:59:36 +0000 http://www.linuxtechi.com/?p=5138#comment-9244 how can we get the list of all the images inside a registry?

]]>
By: Pradeep Kumar https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-7464 Fri, 15 Feb 2019 04:14:56 +0000 http://www.linuxtechi.com/?p=5138#comment-7464 In reply to nag.

Hi Nag,

Did you update your system’s ‘/usr/lib/systemd/system/docker.service’ file and reload daemon service and restart Docker service ..?

]]>
By: nag https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-7460 Thu, 14 Feb 2019 14:55:19 +0000 http://www.linuxtechi.com/?p=5138#comment-7460 By using this I am not able to push images getting the below response
Get ‘https://x.x.x.x:5000/v2/:’ http: server gave HTTP response to HTTPS client

]]>
By: James Yu https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-978 Mon, 24 Jul 2017 13:04:29 +0000 http://www.linuxtechi.com/?p=5138#comment-978 In reply to James Yu.

after I change “192.168.0.31 boot-node” to “192.168.0.31 boot-node boot-node” in /etc/hosts
and change “/usr/bin/dockerd –insecure-registry boot-node:5000” to “/usr/bin/dockerd –insecure-registry=boot-node:5000” for ExecStart
it starts to work

]]>
By: James Yu https://www.linuxtechi.com/setup-docker-private-registry-centos-7-rhel-7/#comment-977 Mon, 24 Jul 2017 06:11:28 +0000 http://www.linuxtechi.com/?p=5138#comment-977 Hi, I just followed through your post and found out the –insecure-registry setting does not work, maybe a hand?
The setting is as follows:
# cat /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd –-insecure-registry boot-node:5000
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

also I have
192.168.0.31 boot-node
in /etc/hosts

]]>