Ohne TLS und Passwort sollte sie nicht öffentlich erreichbar gemacht werden. 1)
ip a s eth1
export PRIVATE_INTERFACE=eth1
echo 'export PRIVATE_INTERFACE=eth1' >> ~/.bashrc
export PRIVATE_IP4=$(/sbin/ip -o -4 addr list ${PRIVATE_INTERFACE} | awk '{print $4}' | cut -d/ -f1)
echo 'export PRIVATE_IP4=$(/sbin/ip -o -4 addr list ${PRIVATE_INTERFACE} | awk '{print $4}' | cut -d/ -f1)' >> ~/.bashrc
docker run -d \ -p $PRIVATE_IP4:5000:5000 \ --restart=always \ --name registry \ registry:3
{
…
"insecure-registries": […, "registry.notebook36.linuxhotel.de:5000"]
}
ip a s eth1
Bitte die PRIVATE IP eintragen…
{
…
"insecure-registries": […, "10.97.7.11:5000", "ingo-1.lxht.de:5000"]
}
systemctl restart docker.service
prüfen: 2)
docker info --format '{{(index .RegistryConfig.IndexConfigs "registry.notebook36.linuxhotel.de:5000").Secure}}'
→ sollte false (=insecure) ausgeben
docker image tag ingo/debian:trixie registry.notebook36.linuxhotel.de:5000/ingo/debian:trixie docker image push registry.notebook36.linuxhotel.de:5000/ingo/debian:trixie
Abfragen, ob das Image angekommen ist:
curl http://registry.notebook36.linuxhotel.de:5000/v2/_catalog curl http://$PRIVATE_IP4:5000/v2/_catalog docker manifest inspect --insecure $PRIVATE_IP4:5000/ingo/debian:trixie curl -s \ http://$PRIVATE_IP4:5000/v2/ingo/debian/tags/list | jq