Run private repository with dind in Kubernetes

Hi :slight_smile:

I try to run my private docker image along with the docker-dind container to be able to run docker commands from the private image in Kubernetes.
My only issue is that the docker run command does not read the docker-secrets so fails by requiring to run docker login. How could I pass the credentials to the docker run command?

Here the piece of my Kubernetes deployment:

containers:
- name: docker-private
image: docker:20.10
command: [‘docker’, ‘run’, ‘-p’, ‘80:8000’, ‘private/image:latest’ ]
resources:
requests:
cpu: 10m
memory: 256Mi
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
envFrom:
- secretRef:
name: docker-secret-keys
- name: dind-daemon
image: docker:20.10-dind
command: [“dockerd”, “–host”, “tcp://127.0.0.1:2375”]
resources:
requests:
cpu: 20m
memory: 512Mi
securityContext:
privileged: true
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker

Thanks!