Friday, July 19, 2019

How to push and pull image in google cloud

Regarding this page we can do that with https://cloud.google.com/container-registry/docs/pushing-and-pulling Just some important step to archive this.

1. Install gcloud
- Download and install gcloud sdk GoogleCloudSDKInstaller.exe

2. Config gcloud and docker
- Run command gcloud auth configure-docker
Note: When you see error like below run this command for fixed that gcloud components install docker-credential-gcr

WARNING: `docker-credential-gcloud` not in system PATH.
gcloud's Docker credential helper can be configured but it will not work until this is corrected.
WARNING: `docker` not in system PATH.
`docker` and `docker-credential-gcloud` need to be in the same PATH in order to work correctly together.
gcloud's Docker credential helper can be configured but it will not work until this is corrected.

3. Now create docker image and tag it

[tag image] docker tag helloImag eu.gcr.io/google-project/helloworld

[push image] docker push eu.gcr.io/google-project/helloworld

No comments:

Post a Comment