- NAME
-
- gcloud docker - enable Docker CLI access to Google Container Registry
- SYNOPSIS
-
-
gcloud docker[--authorize-only,-a] [--docker-host=DOCKER_HOST] [--server=SERVER, [SERVER, …],-sSERVER, [SERVER, …]; default="gcr.io, us.gcr.io, eu.gcr.io, asia.gcr.io, staging-k8s.gcr.io, marketplace.gcr.io"] [GCLOUD_WIDE_FLAG …] [--DOCKER_ARGS…]
-
- DESCRIPTION
-
(DEPRECATED)Enable Docker CLI access to Google Container Registry.gcloud dockerwill not be supported for Docker client versions above 18.03.As an alternative, use
gcloud auth configure-dockerto configuredockerto usegcloudas a credential helper, then usedockeras you would for non-GCR registries, e.g.docker pull gcr.io/project-id/my-image. Add--verbosity=errorto silence this warning:gcloud docker --verbosity=error -- pull gcr.io/project-id/my-image.See: https://cloud.google.com/container-registry/docs/support/deprecation-notices#gcloud-docker gcloud docker wraps Docker commands so that
gcloudcan inject the appropriate fresh authentication token into requests that interact with the Docker registry.All Docker-specific flags are passed through to the underlying
dockercommand. A full reference of Docker's command line options available after--can be found here: https://docs.docker.com/engine/reference/commandline/cli/ . You may also rungcloud docker -- --helpto view the Docker CLI's help directly.Detailed documentation on Container Registry can be found here: https://cloud.google.com/container-registry/docs/
- EXAMPLES
- To pull the image 'gcr.io/google-containers/pause:1.0' from the docker registry,
run:
gcloud docker -- pull gcr.io/google-containers/pause:1.0
Push the image 'gcr.io/example-org/example-image:latest' to our private docker registry.
gcloud docker -- push gcr.io/example-org/example-image:latest
Configure authentication, then simply use docker:
gcloud docker --authorize-only docker push gcr.io/example-org/example-image:latest
- POSITIONAL ARGUMENTS
-
- [--
DOCKER_ARGS…] - Arguments to pass to Docker.
The '--' argument must be specified between gcloud specific args on the left and DOCKER_ARGS on the right.
- [--
- FLAGS
-
- Configure Docker authorization only; do not launch the Docker command-line.
-
--docker-host=DOCKER_HOST - URL to connect to Docker Daemon. Format: tcp://host:port or unix:///path/to/socket.
-
--server=SERVER,[SERVER,…],-sSERVER,[SERVER,…]; default="gcr.io,us.gcr.io,eu.gcr.io,asia.gcr.io,staging-k8s.gcr.io,marketplace.gcr.io" - Address of the Google Cloud Registry.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details.
gcloud docker
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.

