Simplify the use of private Docker images

docker

#1

It is my understanding, that in order to use private docker images, I need to do this:

version: 2
jobs:
  build:
    docker:
      - image: docker:stable-git

    working_directory: ~/app

    steps:
      - setup_remote_docker
      - run: docker login -u $DOCKER_USER -p $DOCKER_PASS
      - run: docker run -t my/image my-test.sh

It would be much nicer, if the “docker” executor section can accept credentials, like this:

version: 2
jobs:
  build:
    docker:
      - image: my/image
      - user: $DOCKER_USER
      - password: $DOCKER_PASSWORD

    working_directory: ~/app

    steps:
      - run: my-test.sh

Of course, this is just a sample implementation, and any actual implementation may probably need to be different - for example, perhaps put these credentials outside of the “image” section, so that it can be reusable, instead of having to add it to every image.


#2

Thank you for filing this feature request.

We will discuss it internally and consider this feature in our upcoming releases.


#3

This would be especially nice if it removes the need to use setup_remote_docker, which seems to be very very slow (I am generally seeing 80+ seconds delay there).


#5

#6