Search code examples
gitlab-cisbt-native-packager

Docker tag with date no longer functions in Gitlab


Previously, I've managed to tag my latest images and push them to Gitlab container registry without any problem for months. However, I've noticed ever since yesterday that Gitlab no longer managed to push my images to its container repository. Here is the stacktrace:

[info] Built image project with tags [0.1-SNAPSHOT, latest]
[success] Total time: 285 s (04:45), completed Dec 13, 2020, 8:56:34 PM
$ docker tag project:latest registry.gitlab.com/group/project:0.1-SNAPSHOT-$(date +%Y-%m-%d-%H-%M-%S)
$ docker push registry.gitlab.com/group/project
Using default tag: latest
The push refers to repository [registry.gitlab.com/group/project]
tag does not exist: registry.gitlab.com/group/project:latest

I can manage to push images by tagging them as such but it is not what I wish to have, since I'd like to differentiate between my images.

    - sbt docker:publishLocal
    - docker tag project:latest registry.gitlab.com/group/project
    - docker push registry.gitlab.com/group/project

I have no changes in my gitlab.yml file and I don't understand why it started to fail all of a sudden. Any help or pointers are appreciated.


Solution

  • I had the same issue, docker push stopped working during Friday and today.

    I fixed this by using a previous image of Docker:

     push:
         tags:
           - dind
         stage: push
    -     image: docker:latest
    +     image: docker:19.03.13
         services:
             - docker:dind
         variables:
             DOCKER_DRIVER: overlay
    

    It corresponds to the recent release of the stable 20.10 version on Docker Hub: https://hub.docker.com/_/docker?tab=tags&page=1&ordering=last_updated&name=20.10