This guide explains how to build Docker images from the directories in this folder and push them to Google Cloud Artifact Registry using the gcloud CLI.
- Docker installed
- gcloud CLI installed and authenticated
- Access to a Google Cloud project with Artifact Registry enabled
gcloud init
gcloud auth login
gcloud auth application-default login
gcloud config set project <gcp-project-id>Skip this step if you already have an artifact repository in Google Cloud Artifact Registry that you can use.
gcloud artifacts repositories create <repository-name> --repository-format=docker --location=<location> --description="Docker repository"Example:
gcloud artifacts repositories create vector-bootcamp --repository-format=docker --location=us-central1 --description="Docker repository for docker images used in the Vector Bootcamp"Navigate to the directory containing the Dockerfile you want to and run the following
gcloud builds submit --region=<location> --tag <location>-docker.pkg.dev/<project-id>/<repository-name>/<image-name>:<tag-name>Example:
gcloud builds submit --region=us-central1 --tag us-central1-docker.pkg.dev/axial-iris-462715-e6/vbootcamp/bootcamp-image:testAfter the build is complete, you can find the docker imgae in the repository in Google Cloud Artifact Registry.