Is it possible to build a Docker image in one project and push it to the registry of another project?
We have a centralized project that builds different variations of the database and we want to push the image to different project (namespace). For example:
- customerA :
We have no issue building the image and pushing it to the registry from same repo. It seems not possible to push images to a different namespace.
$ docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY WARNING! Using --password via the CLI is insecure. Use --password-stdin. ... Login Succeeded ... # build the image $ docker push $FULL_IMG The push refers to repository [registry.mycompany.com/customer-a/database:latest] aed26e04fad5: Preparing 6dd6d5f77ec6: Preparing ... 4423957231fb: Waiting denied: requested access to the resource is denied Cleaning up file based variables ERROR: Job failed: command terminated with exit code 1