You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proxy bypass for registry inside on-premise and storage back end is s3. #492
@jayaram-raju I'm closing this since I don't have enough information to help you.
If you can provide answers for my previous questions, I'll reopen this.
Thanks.
Sorry for the delay , its from registry to s3. as we are hosting the registry inside the enterprise behind the proxy . I might be missing the configuration in registry to upload the images to s3. in docker registry 1.x I was facing the same issue but it got resolved on setting http_proxy as env to registry container.
Yes I Have set both HTTP_PROXY as well as HTTPS_PROXY
cmd :-
sudo docker run -e "HTTP_PROXY=http://<>:<>/" -e "HTTPS_PROXY=http://<>:<>/" registry:2.0
I'm running into the same issues. I am running Docker Registry 2.0.1 in an AWS VPC that is all behind a proxy, we direct all S3 traffic through the proxy as well. I am using IAM roles and have verified that the host has full read/write access to the S3 bucket. The registry is also behind an NGinx Proxy as well. I am running with debug logging enabled and here's what I got when I attempted to push a new image to the repo:
Everything started working, proxy and all. Sorry for the false alarm. But the Registry does indeed pick up the proxy environment variables from the host if present. It was hard to tell if it was the proxy or S3 that was returning the access error.
However, the documentation could highlight the necessary IAM polices for S3 and perhaps the error message could indicate what S3 calls it's trying to make. The message "An Error Occurred" is somewhat cryptic in determining the source of the error.
@damnhandy Could expand on what you mean by adding documentation? I am a little unfamiliar with this particular problem and am unsure what exactly would need to be changed to help future users avoid this issue. Would mind submitting a PR to the s3 documentation?
What I was getting that was that if you use a naïve IAM policy like I was doing, you run into issues. My issue was more of an AWS configuration problem and not a Registry problem. I will submit a PR next week for the docs.
However, I can confirm that the registry is functioning just fine when using the both HTTP_PROXY and HTTPS_PROXY environment variables. But I am doing so using --env-file but things are indeed going through the proxy with the registry -> s3 communication. I would close this particular issue regarding the proxy.
@damnhandy Thank you. I assume you'll be add something that will point out possible issues with IAM roles.
Looking at the registry logs a little more closely, it looks like the s3 library reports little context for the error. This explains the cryptic "Access Denied". I can't promise anything immediately, but I've filed #664 to explore some better error messages here.
Activity
dmp42 commentedon May 5, 2015
Can you clarify what the issue is?
Is this
docker -> registrycommunication orregistry -> s3?Also, we cannot help without at least some minimal information about your setup. Please see https://github.com/docker/distribution/blob/master/CONTRIBUTING.md#so-you-found-a-bug
Thanks
dmp42 commentedon May 15, 2015
@jayaram-raju I'm closing this since I don't have enough information to help you.
If you can provide answers for my previous questions, I'll reopen this.
Thanks.
jayaram-raju commentedon May 15, 2015
Sorry for the delay , its from registry to s3. as we are hosting the registry inside the enterprise behind the proxy . I might be missing the configuration in registry to upload the images to s3. in docker registry 1.x I was facing the same issue but it got resolved on setting http_proxy as env to registry container.
dmp42 commentedon May 15, 2015
Ok. Have you tried settings both HTTP_PROXY and HTTPS_PROXY environment variables?
Can you copy the command you are using to launch the registry?
jayaram-raju commentedon May 19, 2015
Yes I Have set both HTTP_PROXY as well as HTTPS_PROXY
cmd :-
sudo docker run -e "HTTP_PROXY=http://<>:<>/" -e "HTTPS_PROXY=http://<>:<>/" registry:2.0
Attempted fix distribution#492
Attempted fix distribution#492
dmp42 commentedon May 19, 2015
Hi @jayaram-raju
Can you provide your registry logs?
Thanks.
dmp42 commentedon May 27, 2015
@jayaram-raju can you provide your registry logs?
Thanks.
damnhandy commentedon Jun 23, 2015
I'm running into the same issues. I am running Docker Registry 2.0.1 in an AWS VPC that is all behind a proxy, we direct all S3 traffic through the proxy as well. I am using IAM roles and have verified that the host has full read/write access to the S3 bucket. The registry is also behind an NGinx Proxy as well. I am running with debug logging enabled and here's what I got when I attempted to push a new image to the repo:
dmp42 commentedon Jun 23, 2015
ping @stevvooe @RichardScothern
damnhandy commentedon Jun 24, 2015
Scratch that. It turns out it was in fact an IAM permission issue. My initial policy was something like so:
Once I changed it to this:
Everything started working, proxy and all. Sorry for the false alarm. But the Registry does indeed pick up the proxy environment variables from the host if present. It was hard to tell if it was the proxy or S3 that was returning the access error.
However, the documentation could highlight the necessary IAM polices for S3 and perhaps the error message could indicate what S3 calls it's trying to make. The message "An Error Occurred" is somewhat cryptic in determining the source of the error.
stevvooe commentedon Jun 24, 2015
@damnhandy Could expand on what you mean by adding documentation? I am a little unfamiliar with this particular problem and am unsure what exactly would need to be changed to help future users avoid this issue. Would mind submitting a PR to the s3 documentation?
cc @moxiegirl
damnhandy commentedon Jun 26, 2015
What I was getting that was that if you use a naïve IAM policy like I was doing, you run into issues. My issue was more of an AWS configuration problem and not a Registry problem. I will submit a PR next week for the docs.
However, I can confirm that the registry is functioning just fine when using the both
HTTP_PROXYandHTTPS_PROXYenvironment variables. But I am doing so using--env-filebut things are indeed going through the proxy with the registry -> s3 communication. I would close this particular issue regarding the proxy.stevvooe commentedon Jun 26, 2015
@damnhandy Thank you. I assume you'll be add something that will point out possible issues with IAM roles.
Looking at the registry logs a little more closely, it looks like the s3 library reports little context for the error. This explains the cryptic "Access Denied". I can't promise anything immediately, but I've filed #664 to explore some better error messages here.
BrianBland commentedon Jan 26, 2016
Closing with #1391 to cover the IAM permissions documentation