Score:0

Private Docker registry w/ NFS storage and Jenkins

cn flag

I would essentially like to run a private docker registry on an internal LAN that would provide read-only access to a couple of Jenkins nodes. Jenkins Pipeline seems to only allow images from a local registry or an HTTPS based registry via withRegistry() or 'registryUrl'. I'd like to avoid setting up HTTPS/TLS, if possible.

I'm pondering the idea of running a localhost private registry on each Jenkins node and have the registry storage be based on a NFS mount to a NAS so that each localhost registry can pull images from the same storage location and workaround the Jenkins Pipeline API limitation. My question is, what type of issues could this cause or is there a better approach?

Score:0
cn flag

After some trial and error, it looks like using NFS as the location volume mapped to /var/lib/registry will allow for a local registry to run on each docker node with the same backed storage.

For clarity, I did the following on each docker node:

# mount x.x.x.x:/export/registry /mnt/registry
# docker run -d -p 5000:5000 --restart-always --name registry -v /mnt/registry:/var/lib/registry registry:2

Please note that this isn't really secure, as it is using NFS in a potentially unencrypted configuration, so use at your own risk.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.