How to add the storage for a private Docker registry on a minikube VM?

0

I am running minikube kubernetes cluster and used the script here: https://github.com/ContainerSolutions/registry-tooling

To secure a registry pod. The readme says "It will not currently configure a storage backend; please take a look at the config files to see how to do this." But I don't know what config files are referred to. In other words, how to configure a storage solution on a minikube VM (running on a MacOS host on a VirtualBox hypervisor) and configure it as the storage backend to the registry pod? (And make it accessible from the internet)

Julius Baer

Posted 2019-07-26T16:07:27.000

Reputation: 11

Answers

0

I wrote that script, and it's a little out-of-date now. However, it's referring to the Docker Registry config: https://docs.docker.com/registry/configuration/.

In your case, you probably want the registry to save to disk and have the disk be a volume in minikube. I can't remember off hand how volumes work in minikube though.

An alternative that might be easier to get going inside Kubernetes is trow: https://github.com/ContainerSolutions/trow (which is really the successor to the registry tooling project).

Adrian Mouat

Posted 2019-07-26T16:07:27.000

Reputation: 483

It seems like minikube already stores pulled images on the VM file: docker run -d -p 5000:5000 --name registry registry:2 this registry's images survive stop/start. – Julius Baer – 2019-07-27T12:50:34.460

$kubectl get pods NAME READY STATUS RESTARTS AGE copy-certs-5ad65dcc-563b-4b08-8d2d-ff5d002dfd42-fgbsp 0/1 Error 4 113s The copy-certs pod seems to malfunction. I'm not sure it worked yesterday. I can log in to minikube and use docker run -d -p 5000:5000 --name registry registry:2 but then I don't know how to access it externally. minikube create with --image=192.168.99.106:2376 gives an error (certificate error I think). Using --image=localhost:5000/ubuntu does work, but if I understand correctly this is limited in many ways. – Julius Baer – 2019-07-27T13:20:46.673

@JuliusBaer Yes, the registry probably stores images in a volume by default. I'm sure you're right about copy-certs, but I'm afraid I'm no longer maintaining this repo. – Adrian Mouat – 2019-07-28T20:51:57.110

minikube addons enable registry also still exists, isn't copy certs also part of trow? the error looks like the troubleshooting on the readme, but I will explore more, tnx – Julius Baer – 2019-07-29T04:46:28.753