I have configured my GCP docker registry using HA Proxy. Here is my HA Proxy configuration.
frontend myfrontend
bind 0.0.0.0:8080
use_backend maven-repo if { path_beg -i /repository }
use_backend gcp-repo if { path_beg -i /v2/dev-registry }
backend maven-repo
server maven-repo mvn01-ashok-dev.net:443 ssl verify none check inter 5s
backend gcp-repo
server gcp-repo dev-docker.pkg.dev:443 ssl verify none check inter 5s
While pulling docker image from through HA Proxy, i am getting following error.
ashok@ubuntu:~$ docker pull localhost:8080/dev-registry/gateway-cluster-images/nextgen-nativebridge:1.1.0
Error response from daemon: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n <title>Error 404 (Not Found)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>404.</b> <ins>That’s an error.</ins>\n <p>The requested URL <code>/v2/dev-registry/gateway-cluster-images/nextgen-nativebridge:1.1.0</code> was not found on this server. <ins>That’s all we know.</ins>\n"
When I hit the URL in the browser I am getting the following response.
URL: dev-docker.pkg.dev/v2/dev-registry/gateway-cluster-images/nextgen-nativebridge:1.1.0
{
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:3aee49a3c67bb0955033928b3a7b06aa77b9b0cd017a4516d0eab6a14c2001e1",
"size": 2192,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:8ed08295f67053a08ecf4bc74adc24da4261dce0f18cbc8be4902e7c555f9dfc",
"size": 2192,
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
}