-
Hello
it does not use the mirror, in fact looking in the runner logs we can see it tries to use the mirror but fails with this error
We have tried to shell into the container and we can do a direct download from the mirror successfully.
This is issue can be very annoying because it will eventually pull the image from dockerhub and we regularly face ratelimit issues and images cannot be dowloaded anymore. This is particularly true for public Github actions relying packaged using docker that we cannot update to use our direct registry. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
well after some research it seems that we are hitting this docker bug |
Beta Was this translation helpful? Give feedback.
-
I confirm that those 2 workaround work and for those who are interested to make it work here is an excerpt of the apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: example-runnerdeploy
spec:
template:
spec:
image: docker-io-remote.cd.ourcompany.com/summerwind/actions-runner-dind:v2.299.1-ubuntu-20.04-aa6dab5
imagePullSecrets:
- name: ourcompany-registry
dockerEnabled: false
dockerRegistryMirror: https://docker-io-remote.cd.ourcompany.com
dockerdWithinRunnerContainer: true
hostAliases: #this prevents our private registry creds (from the mirror-registry secret) to be leaked to docker servers
- ip: "127.0.0.1"
hostnames:
- "index.docker.io"
- "registry-1.docker.io"
- "docker.io"
initContainers: #this will copy the config.json file from the read-only mounted K8s secret to a read-write volume
- name: copy-docker-config
image: docker-io-remote.cd.ourcompany.com/busybox:1.34.1
command:
- "sh"
- "-c"
- >
set -x;
cp /docker-conf-ro/config.json /docker-conf-rw/config.json;
volumeMounts:
- name: docker-conf-rw
mountPath: /docker-conf-rw
- name: github-actions-runner-registry
mountPath: /docker-conf-ro/config.json
subPath: .dockerconfigjson
volumeMounts: #there is one of volume mounted in the runner with the rw docker config
- name: docker-conf-rw
mountPath: /home/runner/.docker/
volumes:
- name: docker-conf-rw
emptyDir: {}
- name: github-actions-runner-registry #this is mounting the secret containing the config.json file
secret:
secretName: mirror-registry and of course the secret implementing the workaround for the docker issue called
|
Beta Was this translation helpful? Give feedback.
well after some research it seems that we are hitting this docker bug