This guide outlines the process for tagging, and pushing your Docker images to a docker repository.
- Docker: Installed and running on your local machine.
- KubeRay: Minimum version v1.6
Navigate to the kuberay/ dir and run:
make -C historyserver localimage-buildThis will build the following images
- historyserver:v0.1.0
- collector:v0.1.0
Registry tags usually follow the following format:
<REGISTRY_HOST>/<PATH>/<IMAGE_NAME>:<TAG>
Run the following to tag the Collector and History Server images
docker tag historyserver:v0.1.0 <REGISTRY_HOST>/<PATH>/historyserver:v0.1.0
docker tag collector:v0.1.0 <REGISTRY_HOST>/<PATH>/collector:v0.1.0Once tagged, upload the image to the registry:
docker push <REGISTRY_HOST>/<PATH>/historyserver:v0.1.0
docker push <REGISTRY_HOST>/<PATH>/collector:v0.1.0Additional steps specific for pushing to Google Artifact Registry
- Cloud Project: An active cloud project.
- GCloud SDK: Installed and initialized (
gcloud init). - Permissions: Ensure the Artifact Registry API is enabled and you have at
least the
roles/artifactregistry.writerIAM role.
| Variable | Description |
|---|---|
| REGION | The physical location of your repository (e.g., us-east1) |
| PROJECT_ID | Google Cloud Project ID |
| REPO_NAME | AR Repository Name |
export REGION=<location>
export PROJECT_ID=<project-id>
export REPO_NAME=<repository-name>gcloud artifacts repositories create ${REPO_NAME} \
--repository-format=docker \
--location=${REGION} \
--description="History Server images"Configure Docker CLI to authenticate with Google Artifact Registry (AR)
gcloud auth configure-docker ${REGION}-docker.pkg.devThe image has to follow a specific naming convention for Google Artifact Registry
Format:
${REGION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:${TAG}
Perform the push on the tagged images. Example for the history server image:
docker tag historyserver:v0.1.0 ${REGION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/historyserver:v0.1.0