Artifact Registry in Google Cloud
Table of Contents
Add your user to the docker group
sudo usermod -a -G docker ${USER}
Run a simple busy box container
docker run busybox date
Create and AR registry
gcloud artifacts repositories create quickstart-docker-repo \
--repository-format=docker \
--location=us-central1 \
--description="Docker repository"
List AR Repositories
gcloud artifacts repositories list
Configure docker to use gcloud to auth to AR
gcloud auth configure-docker us-central1-docker.pkg.dev
Name format
Addition of type and use of pkg.dev
<location>.gcr.io/<project>/<registry>/<image>:<tag>
<location>-<type>.pkg.dev/<project>/<registry>/<image>:<tag>
Retag and image for the AR registry
docker tag busyboxy \
us-central1-docker.pkg.dev/$PROJECT/quickstart-docker-repo/busybox:tag1
Push the image to AR
docker push us-central1-docker.pkg.dev/$PROJECT/quickstart-docker-repo/busybox:tag1
Pull from AR
docker pull us-central1-docker.pkg.dev/$PROJECT/quickstart-docker-repo/busybox:tag1