[Support] jj9987 - Docker Registry


jj9987

Recommended Posts

DockerRegistry-logo.png

Application: Docker Registry @ https://github.com/docker/distribution-library-image

DockerHub: https://registry.hub.docker.com/_/registry/

GitHub: https://github.com/juusujanar/unraid-templates/blob/master/DockerRegistry.xml

 

This template uses the official Docker Registry image to quickly set up your own private repository for storing Docker images.

 

If you have any issues/questions/suggestions regarding this Docker or the template, feel free to contact here.

Edited by jj9987
Link to comment
  • 4 years later...

How do I activate the authentication ?

In step 1 of the doc  (Link) have to create a password file. When I open the Docker Console, it does not know docker. (sh: docker: not found)

How exactly do I do this ? Do I need to create new variables for this ? 

Link to comment
  • 3 months later...

If you are still intrested I can share my approach:

 

First I am using the Nginx Proxy Manager as entrypoint for ALL my services at my unraid server

image.thumb.png.1f7b08e59d364aa4794966a311b4e351.png

 

Therefor I have created there a entry which points my subdomain (mysub.mydomain.net) to the internal docker registry (f. e. 192.168.0.10:5000) 

 

After that I have created a directory for the htpasswd file on my unraid server: 

mkdir /mnt/user/appdata/docker_registry_auth

 

Then I used this docker temporary container to create the htpasswd file:

docker run \
  --entrypoint htpasswd \
  httpd:2 -Bbn USERNAME PASSWORD > /mnt/user/appdata/docker_registry_auth

Of course replace USERNAME and PASSWORD by your choice.

 

After that I have modified the docker template of DockerRegistry container and added the path to the htpasswd file and the needed Env's:

image.thumb.png.9b46ff209c993953b84af9943e9c4bc6.png

 

Thats all, since the Nginx Proxy Manager will manage the certificate you don't have to do that in the docker registry itself :)

 

Link to comment
  • 2 months later...

Great guide but theres one error and i also thought id add how i found to add multi logins quickly

 

Firstly the docker command given errors as directory exists what same name. The actual command should be..

docker run \
  --entrypoint htpasswd \
  httpd:2 -Bbn USERNAME PASSWORD > /mnt/user/appdata/docker_registry_auth/htpasswd

 

That was the only change i had to get this to work. Also to anyone unsure you use these commands in the unraid terminal which can be access in the top right clicking this icon 

image.png.c1b0eddb45e3cee045a3121f2a7eb6c6.png

 

Lastly if you want to add additional users, while im sure theres more official ways i found i could just rerun the above command and end it with htpasswd2 for the next user.

 

I then cut the contents of that file and added it as a new line into the htpasswd file and restarted my container (restart may not be needed)

 

On 6/6/2022 at 3:52 PM, DiniFarb said:

If you are still intrested I can share my approach:

 

First I am using the Nginx Proxy Manager as entrypoint for ALL my services at my unraid server

image.thumb.png.1f7b08e59d364aa4794966a311b4e351.png

 

Therefor I have created there a entry which points my subdomain (mysub.mydomain.net) to the internal docker registry (f. e. 192.168.0.10:5000) 

 

After that I have created a directory for the htpasswd file on my unraid server: 

mkdir /mnt/user/appdata/docker_registry_auth

 

Then I used this docker temporary container to create the htpasswd file:

docker run \
  --entrypoint htpasswd \
  httpd:2 -Bbn USERNAME PASSWORD > /mnt/user/appdata/docker_registry_auth

Of course replace USERNAME and PASSWORD by your choice.

 

After that I have modified the docker template of DockerRegistry container and added the path to the htpasswd file and the needed Env's:

image.thumb.png.9b46ff209c993953b84af9943e9c4bc6.png

 

Thats all, since the Nginx Proxy Manager will manage the certificate you don't have to do that in the docker registry itself :)

 

 

  • Like 1
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.