Skip to content

Support private container repos in gitlab.com shared runners

Description

On gitlab.com, using the shared runners, it's currently not possible to use images from a private repo. We hold all our images on AWS ECR. There is no way to login to ECR before the requested image is pulled. As ECR login session is terminated every 12 hours, I have to update DOCKER_AUTH_CONFIG env var every 12 hours. A cron like this is not a solution.

Proposal

We'd like to be able to pull images from a private repo and use them for the build jobs. We'd like to provide the access key and secret key and login before the image is pulled.

Links to related issues and merge requests / references

https://support.gitlab.com/hc/en-us/requests/156201