Skip to content

Commit

Permalink
Add example of authenticating Docker in VMs to use GCP Artifact Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
nprihodko committed Jan 18, 2024
1 parent afe8e56 commit 37db1a5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,14 @@ and ``extra_bootstrap`` argument where you can provide additional bash commands
cluster = AzureVMCluster(...
docker_image="my_private_image:latest",
extra_bootstrap=["docker login -u 'username' -p 'password'"])
If you need to access Artifact/Container Registry in GCP, one way of doing it would be to authenticate Docker with
`gcloud credential helper <https://cloud.google.com/artifact-registry/docs/docker/authentication#gcloud-helper>`_ by adding extra bootstrap params similar to
the ones below:

.. code-block:: python
from dask_cloudprovider.gcp import GCPCluster
cluster = GCPCluster(...
docker_image=f"{region}-docker.pkg.dev/{project}/{repo}/{image}:{tag}",
extra_bootstrap=[f"gcloud auth configure-docker {region}-docker.pkg.dev"])

0 comments on commit 37db1a5

Please sign in to comment.