Authorize Docker using gcloud auth configure-docker

cr_buildstep_docker_auth(image, ...)

Arguments

image

name of the Docker image to push or pull from that needs authorization, or simply the registry.

...

Other arguments passed to cr_buildstep_gcloud

Value

A buildstep

Examples

cr_buildstep_docker_auth("us.gcr.io")
#> [[1]]
#> ==cloudRunnerBuildStep==
#> name: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
#> args:
#> - gcloud
#> - auth
#> - configure-docker
#> - -q
#> - us.gcr.io
#> 
cr_buildstep_docker_auth(c("us.gcr.io", "asia.gcr.io"))
#> [[1]]
#> ==cloudRunnerBuildStep==
#> name: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
#> args:
#> - gcloud
#> - auth
#> - configure-docker
#> - -q
#> - us.gcr.io,asia.gcr.io
#> 
cr_buildstep_docker_auth("https://asia.gcr.io/myrepo/image")
#> [[1]]
#> ==cloudRunnerBuildStep==
#> name: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
#> args:
#> - gcloud
#> - auth
#> - configure-docker
#> - -q
#> - asia.gcr.io
#>