File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ docker run --rm --name docker_registry_proxy -it \
43
43
-v $( pwd) /docker_mirror_certs:/ca \
44
44
-e REGISTRIES=" k8s.gcr.io gcr.io quay.io your.own.registry another.public.registry" \
45
45
-e AUTH_REGISTRIES=" auth.docker.io:dockerhub_username:dockerhub_password your.own.registry:username:password" \
46
- rpardini/docker-registry-proxy:0.3.0-beta1
46
+ rpardini/docker-registry-proxy:0.3.0-beta2
47
47
```
48
48
49
49
Example with GCR using credentials from a service account from a key file ` servicekey.json ` :
@@ -57,7 +57,7 @@ docker run --rm --name docker_registry_proxy -it \
57
57
-e AUTH_REGISTRIES_DELIMITER=" ;;;" \
58
58
-e AUTH_REGISTRY_DELIMITER=" :::" \
59
59
-e AUTH_REGISTRIES=" gcr.io:::_json_key:::$( cat servicekey.json) ;;;auth.docker.io:::dockerhub_username:::dockerhub_password" \
60
- rpardini/docker-registry-proxy:0.3.0-beta1
60
+ rpardini/docker-registry-proxy:0.3.0-beta2
61
61
```
62
62
63
63
Let's say you did this on host ` 192.168.66.72 ` , you can then ` curl http://192.168.66.72:3128/ca.crt ` and get the proxy CA certificate.
Original file line number Diff line number Diff line change @@ -240,6 +240,12 @@ echo "Docker configured with HTTPS_PROXY=$scheme://$http_host/"
240
240
set $original_uri $uri ;
241
241
set $orig_loc $upstream_http_location ;
242
242
243
+ # during this process, nginx will preserve the headers intended for the original destination.
244
+ # in most cases thats okay, but for some (eg: google storage), passing an Authorization
245
+ # header can cause problems. Also, that would leak the credentials for the registry
246
+ # into the storage system (unrelated).
247
+ proxy_set_header Authorization "" ;
248
+
243
249
# nginx goes to fetch the value from the upstream Location header
244
250
proxy_pass $orig_loc ;
245
251
proxy_cache cache;
You can’t perform that action at this time.
0 commit comments