Search code examples
dockerdocker-composeartifactory

Use multiple logins in the same docker-compose.yml file


I am trying to pull images from the same Artifactory repo using 2 different access tokens. This is because one image is available to one user, and another one is accessible by another user.

I tried using docker login, but I can login only once to a repo. Is there a way to specify in the docker-compose.yml file a user and token that Compose should use in order to pull the image?


Solution

  • The docker-compose file specification does not support providing credentials per service / image.

    But putting this technicality aside, the described use case clearly indicates there is a user who needs access to both images...