Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Deploy image from CapRover's own Registry #755

Closed
wiradikusuma opened this issue Jul 8, 2020 · 13 comments
Closed

[Question] Deploy image from CapRover's own Registry #755

wiradikusuma opened this issue Jul 8, 2020 · 13 comments
Labels

Comments

@wiradikusuma
Copy link

I created a local Docker Registry from CapRover admin > Cluster > Docker Registry Configuration:

Default Push Registry
Docker Registry for Pushing New Images: captain @ registry.SUB.DOMAIN.com:996 

I have successfully deployed an image using jib:

jib {
	from {
		image = 'gcr.io/distroless/java:11'
	}
	to {
		image = 'registry.SUB.DOMAIN.com:996/myapp/backend'
		auth {
			username = 'captain'
			password = 'PASSWORD'
		}
	}
	container {
		ports = ['8181']
	}
}

I tried to deploy using Method 6: Deploy via ImageName:

registry.SUB.DOMAIN.com:996/myapp/backend:latest

But the Build Logs gave me this:

------------------------- Wed Jul 08 2020 15:32:50 GMT+0000 (Coordinated Universal Time)
Build started for myapp-backend
An explicit image name was provided (registry.SUB.DOMAIN.com:996/myapp/backend:latest). Therefore, no build process is needed.
Pulling this image: registry.SUB.DOMAIN.com:996/myapp/backend:latest This process might take a few minutes.
Build has failed!
----------------------
Deploy failed!
Error: (HTTP code 500) server error - Get https://registry.SUB.DOMAIN.com:996/v2/myapp/backend/manifests/latest: no basic auth credentials

What do I miss?

@githubsaturn
Copy link
Collaborator

You don't seem to miss anything - but I don't think this use case has ever been tested where you pushed an image from the outside to the registry - because it was not designed to be used by a third party system.

How are you getting the password for the registry?

@wiradikusuma
Copy link
Author

Ah, I initially wanted to create local private repository from Docker Desktop, but then I thought oh maybe the one managed by CapRover is better.

I followed the steps from https://www.gitmemory.com/issue/caprover/caprover/489/524311421 for the password.

What is your suggestion?

@githubsaturn
Copy link
Collaborator

Generally speaking, it's better for your Docker registry to be elsewhere. Gitlab has a generous free docker registry.

I'll keep this issue open to get to the bottom of it.

@wiradikusuma
Copy link
Author

For some unknown reason, Gitlab keeps giving me timeout and googling doesn't give me satisfactory answer.

I settled on my own private registry in the same Docker host. It works (I can push, CapRover can pull), but I don't like this solution because:

  1. I feel uncomfortable having 2 private repositories for no strong reason.
  2. I can't delete the first one that I "accidentally" created :)

@githubsaturn
Copy link
Collaborator

Why can you not delete the self hosted registry?

@wiradikusuma
Copy link
Author

Cannot Delete Default Push

This registry is set to be the default push. You cannot delete the default push registry. To remove, first you need to change the default push registry to another registry, or completely disable the default push registry. Then, come back and delete this.

But I don't see how to change the default registry.

@githubsaturn
Copy link
Collaborator

Just click on the default push and disable it.
image

@wiradikusuma
Copy link
Author

Good Lord, it's in front of my eyes! Thank you!

@tomeraviv
Copy link

Ah, I initially wanted to create local private repository from Docker Desktop, but then I thought oh maybe the one managed by CapRover is better.

I followed the steps from https://www.gitmemory.com/issue/caprover/caprover/489/524311421 for the password.

What is your suggestion?

Anyone know how to get the password for the self hosted docker registry? (the link is dead).

@frederikhors
Copy link

I settled on my own private registry in the same Docker host.

Can I ask you which, @wiradikusuma?

@maietta
Copy link

maietta commented Mar 1, 2023

Ah, I initially wanted to create local private repository from Docker Desktop, but then I thought oh maybe the one managed by CapRover is better.
I followed the steps from https://www.gitmemory.com/issue/caprover/caprover/489/524311421 for the password.
What is your suggestion?

Anyone know how to get the password for the self hosted docker registry? (the link is dead).

The link is not only dead, it's flagged as malware. Looking at the source, it seems pretty odd, as well. (It's a bot detection page).

@frederikhors
Copy link

Ah, I initially wanted to create local private repository from Docker Desktop, but then I thought oh maybe the one managed by CapRover is better.
I followed the steps from https://www.gitmemory.com/issue/caprover/caprover/489/524311421 for the password.
What is your suggestion?

Anyone know how to get the password for the self hosted docker registry? (the link is dead).

The link is not only dead, it's flagged as malware. Looking at the source, it seems pretty odd, as well. (It's a bot detection page).

The link is just to #489 (comment).

@Cristy94
Copy link

Just click on the default push and disable it. image

I struggled with the same problem, that is very un-intuitive UI and I had to find this solution to make it work.

The problem is that the icon next to the default push registry looks like it's a "Rename" icon, when it actually opens a dropdown menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants