Docker image dockerhub private repo



Hi all. My docker image is in a private repo. What settings do I need to put into the CircleCi 2.0 yml file to authenticate into DockerHub? If not can it build the docker image using a dockerfile in the repo?


You can’t use a private image as the base image on executorType: docker right now. But you can use it on executorType: machine; just log in and pull down the images you need.


Thanks, for the time being I have used a public image and then setup a large circle yml file to apply all the updates required to the image. Looking forward to finally supporting private images!


Do we have an ETA as to when we can pull down private docker images?


So I was just able to use a private image with the docker executor and setup-docker-engine using this:

      - type: shell
        name: Install Docker Client
        command: |
          echo "test"
          curl -L -o /tmp/docker.tgz
          tar -xz -C /tmp -f /tmp/docker.tgz
          mv /tmp/docker/docker* /usr/bin/

          curl -L "$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
          chmod +x  /usr/bin/docker-compose

      - type: setup-docker-engine

      - type: shell
        name: Verify Docker Works
        command: |
          docker --version
          docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
          docker run $PRIVATE_IMAGE

I set those environment variables via the UI. I think it’s possible to get your docker-engine containers talking to those not on docker-engine by using docker network. I haven’t gone through those steps myself yet, though.