ambitious-actor-36781
05/10/2022, 11:14 AM./pants publish
to a google artifact registry,
but I can with docker push
./pants publish ::
23:12:37.52 [INFO] Completed: Building docker image australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web:latest
23:12:37.52 [INFO] Built docker image: australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web:latest
The push refers to repository [australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web]
6ea10f7d4ca8: Preparing
22ada191c158: Preparing
53db6fbe920f: Preparing
315bbfd9d1d9: Preparing
2c7950a1245f: Preparing
9c1b6dd6c1e6: Waiting
denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/coneheads-wgtn/locations/australia-southeast1/repositories/containers" (or it may not exist)
✕ australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web:latest failed.
docker push australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web:latest
The push refers to repository [australia-southeast1-docker.pkg.dev/coneheads-wgtn/containers/web]
6ea10f7d4ca8: Pushed
22ada191c158: Pushed
53db6fbe920f: Pushed
315bbfd9d1d9: Pushed
2c7950a1245f: Pushed
9c1b6dd6c1e6: Pushed
latest: digest: sha256:0b3ae52304c677a408ff1de287ae5138252a3a3b788279bcfe0620d946a26e6b size: 1582
curved-television-6568
05/10/2022, 12:39 PM[docker].tools
with any required docker auth plugin scripts.rapid-exabyte-76685
05/11/2022, 4:02 AM[docker] tools = ["gcloud"]
and ultimately, there was some other tool that also needed to be on the path but it wasn’t clear what it was… and various ways of debugging this (explored in that thread) didn’t yield fruit.[docker] env_vars = [ …, "PATH" ]
and publishing to GCP Artifact Registry is working for me. However… https://pantsbuild.slack.com/archives/C046T6T9U/p1651129704640679?thread_ts=1651122232.246399&cid=C046T6T9Ucurved-television-6568
05/11/2022, 5:25 AMhundreds-father-404
05/11/2022, 4:25 PMcurved-television-6568
05/11/2022, 4:26 PMpublish
goal didn’t copy the behavior from the run
goal wrgt the chroot placeholder (as the chroot is not known there, as it is not executed in the workspace). The above PR address this, and I’ve now managed to ./pants publish
a docker image to a google cloud registry, using only [docker].tools
hundreds-father-404
05/11/2022, 5:42 PMrapid-exabyte-76685
05/11/2022, 10:59 PMFor example, a config file using GCloud might look like this:That is usual established by running the
gcloud
tool like so…
gcloud auth configure-docker europe-docker.pkg.dev # With a different registry name if appropriate.
…with gcloud’s authentication to the GCP project having been established previously… but you’re probably across that and its considered out of scope for the documentation?hundreds-father-404
05/11/2022, 11:35 PMrapid-exabyte-76685
05/11/2022, 11:35 PMhundreds-father-404
05/12/2022, 3:56 PMagreeable-oyster-28981
05/25/2022, 4:45 PMcurved-television-6568
05/25/2022, 4:47 PMagreeable-oyster-28981
05/25/2022, 4:50 PM