Anyone ever have issues using the docker side car ...
# ask-community
z
Anyone ever have issues using the docker side car recipe? I can’t get the docker side car to authenticate to docker hub. We are using the same registry credentials we use in job containers, and that works not problem. Thinking the docker daemon inside the sidecar needs to login also somehow? Not sure though.
k
Hey @Zach Schumacher, we’re looking into this but this is not really something we’ve tried ourselves. We invite the community to chime in and we’ll try out best to find an answer.
z
somewhat hacky, but this is what ended up working for me. I removed the pull image task and am pulling the image as part of the container lifecycle. I then have a python task that sleeps for ~45 seconds to give it time.
Copy code
- name: dind-daemon
          image: docker:stable-dind
          env:
            - name: DOCKER_TLS_CERTDIR
              value: ""
          resources:
            requests:
              cpu: 1
              memory: 1G
          securityContext:
            privileged: true
          volumeMounts:
            - name: docker-graph-store
              mountPath: /var/lib/docker
          lifecycle:
            postStart:
              exec:
                command: ["/bin/sh", "-c", "docker login -u {docker_user} -p {docker_pw} && docker pull my_repo/myimage:latest"]
for the life of me, couldn’t get the PullImage task to handle auth properly
might dig into this weekend and see if there is something i could PR in regards to that
👍 1