Search code examples
google-cloud-storagegoogle-cloud-buildcicd

Can I push an image built in Cloud Build to an image registry that is not Cloud Storage?


Using Cloud Build, can I push the resulting image to a different image registry rather than gcr.io?


Solution

  • If your build produces artifacts such as binaries or tarballs, you can choose to store them in Cloud Storage or any private third-party repository.

    You can check this example to push images to Docker Hub. Note in the example build config file that REPOSITORY is the name of your Docker repository to which you're pushing the image. You should try similar steps in order to push the resulting image to a private image registry.

    Doing this could also imply building repositories as in the repositories from GitHub and from repositories from GitHub Enterprise .