I’m using GitLab.com and trying to push an image to a different container repository under the same project group (on GitLab.com) and I’m having some issues logging in. I’ve setup the
DOCKER_AUTH_CONFIG variable. Here’s my build step:
build: stage: build services: - docker:dind script: - docker login registry.gitlab.com - docker build -t registry.gitlab.com/<group>/<repo>:$CI_BUILD_REF_NAME -f Dockerfile . - docker push registry.gitlab.com/<group>/<project>:$CI_BUILD_REF_NAME
This fails like so:
$ docker login registry.gitlab.com Error: Cannot perform an interactive login from a non TTY device
I’ve no idea why this doesn’t work, as I can echo out the env variable and it does in fact exist. Does anyone have some suggestions for why this is failing?