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
The main symptom is `Error response from daemon: toomanyrequests: Too Many Requests. Please see https://docs.docker.com/docker-hub/download-rate-limit/` during pulls.
19
19
Many unknowing Kubernetes clusters will hit the limit, and struggle to configure `imagePullSecrets` and `imagePullPolicy`.
20
20
21
-
Since version `0.6.0`, this proxy can be configured with the env var `ENABLE_MANIFEST_CACHE=true` which provides
21
+
Since version `0.6.0`, this proxy can be configured with the env var `ENABLE_MANIFEST_CACHE=true` which provides
22
22
configurable caching of the manifest requests that DockerHub throttles. You can then fine-tune other parameters to your needs.
23
-
Together with the possibility to centrally inject authentication (since 0.3x), this is probably one of the best ways to bring relief to your distressed cluster, while at the same time saving lots of bandwidth and time.
23
+
Together with the possibility to centrally inject authentication (since 0.3x), this is probably one of the best ways to bring relief to your distressed cluster, while at the same time saving lots of bandwidth and time.
24
24
25
25
Note: enabling manifest caching, in its default config, effectively makes some tags **immutable**. Use with care. The configuration ENVs are explained in the [Dockerfile](./Dockerfile), relevant parts included below.
Essentially, it's a [man in the middle](https://en.wikipedia.org/wiki/Man-in-the-middle_attack): an intercepting proxy based on `nginx`, to which all docker traffic is directed using the `HTTPS_PROXY` mechanism and injected CA root certificates.
54
+
Essentially, it's a [man in the middle](https://en.wikipedia.org/wiki/Man-in-the-middle_attack): an intercepting proxy based on `nginx`, to which all docker traffic is directed using the `HTTPS_PROXY` mechanism and injected CA root certificates.
55
55
56
-
The main feature is Docker layer/image caching, including layers served from S3, Google Storage, etc.
56
+
The main feature is Docker layer/image caching, including layers served from S3, Google Storage, etc.
57
57
58
58
As a bonus it allows for centralized management of Docker registry credentials, which can in itself be the main feature, eg in Kubernetes environments.
59
59
60
-
You configure the Docker clients (_err... Kubernetes Nodes?_) once, and then all configuration is done on the proxy --
60
+
You configure the Docker clients (_err... Kubernetes Nodes?_) once, and then all configuration is done on the proxy --
61
61
for this to work it requires inserting a root CA certificate into system trusted root certs.
62
62
63
63
## master/:latest is unstable/beta
@@ -87,6 +87,8 @@ for this to work it requires inserting a root CA certificate into system trusted
87
87
-`hostname`s listed here should be listed in the REGISTRIES environment as well, so they can be intercepted.
88
88
- Env `AUTH_REGISTRIES_DELIMITER` to change the separator between authentication info. By default, a space: "``". If you use keys that contain spaces (as with Google Cloud Registry), you should update this variable, e.g. setting it to `AUTH_REGISTRIES_DELIMITER=";;;"`. In that case, `AUTH_REGISTRIES` could contain something like `registry1.com:user1:pass1;;;registry2.com:user2:pass2`.
89
89
- Env `AUTH_REGISTRY_DELIMITER` to change the separator between authentication info *parts*. By default, a colon: "`:`". If you use keys that contain single colons, you should update this variable, e.g. setting it to `AUTH_REGISTRIES_DELIMITER=":::"`. In that case, `AUTH_REGISTRIES` could contain something like `registry1.com:::user1:::pass1 registry2.com:::user2:::pass2`.
90
+
- Env `UPSTREAM_MAPPINGS` to configure upstream server mappings (similar in functionality to /etc/hosts entries but with round-robin selection).
91
+
Useful when configured resolvers are unable to resolve a host. e.g. `UPSTREAM_MAPPINGS="registry1=10.0.1.10:443,10.0.1.11 registry2=5.0.1.10"`
90
92
- Timeouts ENVS - all of them can pe specified to control different timeouts, and if not set, the defaults will be the ones from `Dockerfile`. The directives will be added into `http` block.:
91
93
- SEND_TIMEOUT : see [send_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#send_timeout)
92
94
- CLIENT_BODY_TIMEOUT : see [client_body_timeout](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout)
For Google Container Registry (GCR), username should be `_json_key` and the password should be the contents of the service account JSON.
159
-
Check out [GCR docs](https://cloud.google.com/container-registry/docs/advanced-authentication#json_key_file).
160
+
For Google Container Registry (GCR), username should be `_json_key` and the password should be the contents of the service account JSON.
161
+
Check out [GCR docs](https://cloud.google.com/container-registry/docs/advanced-authentication#json_key_file).
160
162
161
-
The service account key is in JSON format, it contains spaces ("``") and colons ("`:`").
163
+
The service account key is in JSON format, it contains spaces ("``") and colons ("`:`").
162
164
163
165
To be able to use GCR you should set `AUTH_REGISTRIES_DELIMITER` to something different than space (e.g. `AUTH_REGISTRIES_DELIMITER=";;;"`) and `AUTH_REGISTRY_DELIMITER` to something different than a single colon (e.g. `AUTH_REGISTRY_DELIMITER=":::"`).
164
166
@@ -274,7 +276,7 @@ Since `0.4` there is a separate `-debug` version of the image, which includes `n
274
276
This allows very in-depth debugging. Use sparingly, and definitely not in production.
-[ ] Test and make auth work with quay.io, unfortunately I don't have access to it (_hint, hint, quay_)
320
322
-[x] Hide the mitmproxy building code under a Docker build ARG.
321
323
-[ ] "Developer Office" proxy scenario, where many developers on a fast LAN share a proxy for bandwidth and speed savings (already works for pulls, but messes up pushes, which developers tend to use a lot)
0 commit comments