Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: google/docker-registry container usage

Does the google/docker-registry container exist solely to push/pull images from Google Cloud Storage? I am currently following their instructions on Git and have the docker-registry container running, but can't seem to pull from my bucket.

I started it with:

sudo docker run -d -e GCS_BUCKET=mybucket -p 5000:5000 google/docker-registry

I have a .tar Docker image stored in Cloud Storage, at mybucket/imagename.tar. However, when I execute:

sudo docker pull localhost:5000/imagename.tar

It results in:

2014/07/10 19:15:50 HTTP code: 404

Am I doing this wrong?

like image 448
kungfuspider Avatar asked Dec 05 '25 03:12

kungfuspider


1 Answers

You need to docker push to the registy instead of copying your image tar manually.

From where you image is:

docker run -ti --name gcloud-config google/cloud-sdk \
  gcloud auth login
docker run -ti --volumes-from gcloud-config google/cloud-sdk \
  gcloud config set project <project>
docker run -d -e GCS_BUCKET=bucketname -p 5000:5000 \
  --volumes-from gcloud-config google/docker-registry
docker tag imagename localhost:5000/imagename
docker push localhost:5000/imagename

Then from the place you want to run the image from (ex: GCE):

docker run -d -e GCS_BUCKET=bucketname -p 5000:5000 google/docker-registry
docker run localhost:5000/imagename
like image 180
proppy Avatar answered Dec 08 '25 06:12

proppy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!