Athomas1 Posted June 24, 2020 Posted June 24, 2020 I would love to be able to add a private docker registry such as Google Cloud Registry or any other similar service. Here is why: Im a developer who wants to be able to run a ci/cd pipeline where my test environment is my unraid server. I may only have a few private repos but I dont want to have to go through an elongated setup process when onboarding a new image. If its implemented from unraid itself, then I wont be tied into staying with Google Cloud Registry, I can simply migrate to a different provider when im ready and my entire test server will operate the same. Im not sure if this appeals to most users but it definitely appeals to me and id love to reduce the time i spend on devops by using unraid. Quote
glennv Posted June 25, 2020 Posted June 25, 2020 (edited) What you can do is do what i did. I installed a gitlab docker on unraid and use it as my main private git repo and docker registry. It has all kinds of inbuild ci/cd and i use it to build pipelines to aws and azure. I also intalled a gitlab runner docker for this in docker mode. So gitlab can trigger the runner to build and start other dockers itself. Bit of inception (docker in docker etc) I have unraid pull my private docker images from this gitlab docker which hosts a private docker repository. I do have my own proper ssl certificate for my domain and ssl is always required for docker repos (unraid requires that to be able to pull from it and so do many other services) i use this image for gitlab : gitlab/gitlab-ce and for (optional) gitlab runner : gitlab/gitlab-runner for the runner to be able to build and start dockers you have to add a path variable (docker and host value the same ) : /var/run/docker.sock (in read only mode is enough) Edited June 25, 2020 by glennv Quote
Athomas1 Posted June 25, 2020 Author Posted June 25, 2020 Thanks for the reply Quote I have unraid pull my private docker images from this gitlab docker which hosts a private docker repository. How were you able to accomplish this part? Quote
glennv Posted June 25, 2020 Posted June 25, 2020 In essence its the same as if you would push an image to a dockerhub private repo and then pull it into unraid .You fill in the full url to your image in your repo , so for example: gitlab-cr.mydomain.com:5005/groupname/dockerimagename:latest But to get that to work you need to authenticate unraid against you repo. Same as if you would push an. image to the repo. For that you use the comand : docker login registryname. (at the unraid host commandline !!) Typicaly you would create a user and an acces token in gitlab and use that at the login prompt instead of your admin user/password and you can limit the access allowed via that token to just push/pull to the registry.Once logged in , you can define/pull the docker image as any normal dockerhub image. If you click help in gitlab in your docker registry it will tell you exactly all the commands you need to push an image in and to pull the image out etc. It is very good with help. Very extensive documentation and specific to where you are and what you want to do. p.s. as mentioned you need an ssl cert for your gitlab either a proper one or maybe via letsencrypt (never used it ), otherwise the docker login on unraid will fail. Tried it in the past with another local docker registry that only had http and i could not get it to work. There is some sort of hack setting unraid to allow unauthorised registries but did not get it to work. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.