-
Notifications
You must be signed in to change notification settings - Fork 617
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
Can't push when using frontend as registry #75
Comments
Yes, that is pretty much the same how i'm running it, though it's on AWS and the HTTPS part is managed by an ELB with the respective cert. Everything behind the ELB is running plain HTTP (ELB:80->frontend:80, frontend:80->registry:5000 and currently also ELB:443->registry:5000), so i don't suppose i need to use meh. scratch that... i just discovered that you're forcing ENV_MODE_BROWSE_ONLY, so the use-frontend-as-registry function is pretty useless for now. That's not mentioned at the link you asked me to check, though ;-) |
@jangrewe Currently the v2 frontend can only run in browse only mode. I'm forcing it because the buttons to delete/add a tag are misleading if the functionality is not yet implemented. |
@kwk I guess this functionality is not (yet) implemented in registry:v2. Do you maybe have some references for us, where the progress of such features in registry:v2 can be tracked? |
@kwk It can only run in browse mode because the frontend doesn't support pushing, or because you don't want to mislead users with non-functional buttons? Because i'd take non-functional buttons over not being able to push any day of the week! 😀 |
@jangrewe usually you push to the registry directly and not through the front-end. The proxy that is set up in the front-end is just to circumvent CORS. In other words: the front-end doesn't determine whether you can push to your registry. |
@kwk Yes, as mentioned above, i can push to the registry. I just can not push to the registry through the frontend, and as you can see from the error message i provided above, that's not restricted by the registry, but by the frontend - or more specifically by your Apache conf.
So YES, the frontend (read: the frontend's webserver) determines wether i can push to my registry or not... |
If pushing to the registry through the front-end used to work, it was by accident and not by design. It was never tested. Go ahead and fork the repo, make the changes and open a pull request if you already spotted the problematic piece of code. |
I think we're not talking about the same issue...
I don't see any problematic code because i didn't look for any, as the first (and so far: only) hurdle is limiting requests to GET. But i didn't want to go ahead and just switch off BROWSE_ONLY if there's anything that would break pushing anyways (read: a good reason to keep it enabled, other than non-functional buttons). |
Well, the reason for only allowing GET requests is security. There used to be a time when actually PUT and POST requests have been made through the interface to tag an image or delete a tag. I hope that I can implement those methods again some day. That's why it is limiting to GET still. |
I've just encountered this issue for some strange reason. I pushed one image ok but then I tried to push another from a different server and I got this exact error message. After reading all of this I thought why not just proxy the registry commands straight through :) Here's an nginx config that others might use for reference that works for us.
|
This is still an issue, however the fix is trivial and I've created a PR. The current Apache config is already setup to proxy all /v2/ requests straight to the registry
However, the @jc21 No need for nginx, just 3 more lines in the Apache config :) |
I have the frontend running on 80 and 443, proxying to the registry on 5000. When trying to push an image through the frontend to the registry, i get:
I've set the following EnvVars:
As a workaround i'm currently sending 80 to the frontend and 443 straight to the registry, but i'd like to use the frontend via HTTPS, too! ;-)
The text was updated successfully, but these errors were encountered: