gcp artifact repositry getting started

gcp artifact repository helps tos store you container images. First we need to authenticate ourselves to it. 

To do that, we simply, run the following commmands to enable and authenticate ourselves to the registry

gcloud services enable artifactregistry.googleapis.com

gcloud auth configure-docker australia-southeast1-docker.pkg.dev

Pulling docker images

Next we can pull our images using the following command 

docker pull australia-southeast1-docker.pkg.dev/project-xxxxxxx/cloud-run-source-deploy/mytestapp:latest

Pushing docker images - the weird moments

When pushing, for some reason I am not able to do that with docker

# Download crane 

curl -sL "https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_Linux_x86_64.tar.gz" | tar -xz crane 

# Push both tags from the tarball 

./crane push ~/mytestapp.tar australia-southeast1-docker.pkg.dev/project-xxxxx/cloud-run-source-deploy/mytestapp:latest ./crane push ~/mytestapp.tar australia-southeast1-docker.pkg.dev/project-xxxxx/cloud-run-source-deploy/mytestapp:v1

When i tried to push using docker, I am getting 405. 


Comments

Popular posts from this blog

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

llama cpp running it in google colab