Skip to content

Docker Registry Proxy

Adam Novak edited this page Nov 10, 2021 · 1 revision

We're running a proxy for the Docker Hub registry, because we run containers in containers in containers and have to pull things very often. We also don't necessarily have machinery to do a docker login or Singularity equivalent in each of the containers.

The default deployment parameters don't work well for us (the pods keep dying because presumably they reach the default memory or disk limit, or are too slow responding to the heartbeat and Kubernetes kills them), so we need to use some particular values on the Helm chart we use.

Here's how to update the proxy deployment:

cat >docker-values.yml <<EOF
image:
    pullPolicy: IfNotPresent
replicaCount: 2
configData:
  proxy:
    remoteurl: https://registry-1.docker.io
service:
  port: 80
  sessionAffinity: ClientIP
resources:
  limits:
    cpu: 1000m
    memory: 1G
    ephemeral-storage: 50G
  requests:
    cpu: 1000m
    memory: 1G
    ephemeral-storage: 50G
EOF

helm upgrade --recreate-pods --namespace toil docker-registry -f docker-values.yml twuni/docker-registry