Container registry not showing tags

I have a CI/CD pipeline that builds a pair of docker images, tags them, and pushes them to my private container registry on gitlab.com. This has worked fine for a couple of years now, but in the last week or so my image tags are no longer appearing in the container registry - only “latest” actually makes it to the CR. Subsequently my K8S cluster is unable to pull down the container as required because the tag does not exist in the registry. This is the relevant part of my .gitlab-ci.yml file:

  script:
    - echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
    - docker-compose -f docker/docker-compose.yml up -d --build app
    - echo $CI_COMMIT_SHA
    - echo $CI_COMMIT_SHORT_SHA
    - docker tag $CI_REGISTRY/mscott83/demo-app/app $CI_REGISTRY/mscott83/demo-app/app:$CI_COMMIT_SHORT_SHA
    - docker push $CI_REGISTRY/mscott83/demo-app/app

No errors or anything, but the only tag that appears in my container registry is “latest” - the CI_COMMIT_SHORT_SHA tag never appears. This means my pipeline is now completely stalled and app updates are not actually making it to live.

What gives? Did something change recently?

What image are you using? image: xxxx

image: docker:20-dind

This image looks like it hasn’t been modified since last year so I don’t think that’s the cause of the change in bahaviour.

I have managed to get it to work again now, I just have to push each tag individually:

    - docker push $CI_REGISTRY/mscott83/demo-app/app:$CI_COMMIT_SHORT_SHA
    - docker push $CI_REGISTRY/mscott83/demo-app/app:latest

Which is annoying and it’s not how it was working a few weeks ago, the last time I pushed a change.

1 Like

Congrats @mscott83 for addressing the problem you encountered :metal: :crossed_fingers: :metal: :crossed_fingers: .

Which is annoying and it’s not how it was working a few weeks ago, the last time I pushed a change.

:sob:

This image looks like it hasn’t been modified since last year so I don’t think that’s the cause of the change in bahaviour.

Docker 20.10.0 and Docker 20.10.16 are totally different (at least to me).

  • Alpine 3.12 to 3.16
  • No compose to Compose 2.6.0 included
  • No buildx to 0.8.2 included
  • etc.
image: docker:20-dind

I would say, try it out to use 20.10.15-dind-alpine3.15 tag instead. I guess it includes Compose 2.5.x instead of 2.6.0.

By the way why are you using dind in image? In general you do not need to use -dind in image:, not in service:.