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:
- name: docker-private
command: [‘docker’, ‘run’, ‘-p’, ‘80:8000’, ‘private/image:latest’ ]
- name: DOCKER_HOST
- name: dind-daemon
command: [“dockerd”, “–host”, “tcp://127.0.0.1:2375”]
- name: docker-graph-storage