docker / hub-feedback

Feedback and bug reports for the Docker Hub
https://hub.docker.com
234 stars 39 forks source link

Docker hub auto build cannot find existing docker images #2133

Closed garyli03 closed 3 years ago

garyli03 commented 3 years ago

Problem description

I try to get .Config.Labels from parament image in post_push, but this function does not work since July 6th 2021 because docker build cannot find the target docker image.

My repositpories: _

_ (Both are private repository) __ depends on __, what I want to do is retrieving "_version_" info from "__" image and add the version info in the docker tag of the new built __ image. To achieve that, I have code in my _post_push_ script like: ``` VERSION=`docker inspect --format '{{ index .Config.Labels "version"}}' ${IMAGE_NAME}` RAI_VER=`docker inspect --format '{{ index .Config.Labels "version"}}' :v1_latest` DOCKER_TAG1="${VERSION}"-rai"${RAI_VER}" docker tag $IMAGE_NAME ${DOCKER_REPO}:$DOCKER_TAG1 docker push ${DOCKER_REPO}:$DOCKER_TAG1 ``` This worked well in the past: ``` ... Executing post_push hook... BRANCH: master The push refers to repository [docker.io//tools] ... ``` but starting from July 6th, this function failed with following error which is shown in build log: ``` ... Executing post_push hook... WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release Error: No such object: :v1_latest ... ``` While tag _:v1_latest_ does exit in my repositiry, I wonder this is because of docker hub security policy change or command change? Is this a regression of docker hub build? Is there a workaround to mitigate the problem, or will docker hub provide a fix for this issue? Thanks!
garyli03 commented 3 years ago

The problem is resolved by adding an additional label in parent image and inherit the label in child image