I'm looking at speeding up our Docker image builds...
# general
e
I'm looking at speeding up our Docker image builds with Pants, and as the first idea I'd like to experiment with remote caching. I started a Bazel remote cache locally, added the below piece to my
pants.toml
under
[GLOBAL]
:
Copy code
remote_cache_read = true
remote_cache_write = true
remote_store_address = "<grpc://localhost:9092>"
remote_instance_name = "main"
and: 1. I see no difference in how Pants works. 2. The directory mounted to the cache's running container doesn't have any actual files, just some indices. What am I doing wrong? How can I debug it?
oh, I guess just Docker layer cache (not Pants' cache) works for the Docker backend, see https://pantsbuild.slack.com/archives/C046T6T9U/p1744210991104779
on a related topic (talking about caching), I started wondering on the point of using
{pants.hash}
in an image's tag. How can I get the hash without actually building an image, so that I can fetch a desired image?
so if we build images with a command like
pants package foo/bar:baz
, I'd expect a flag to this command that would return just the hash. Or is there another intended use of
pants.hash
I'm not seeing?
(sorry for mixing up two topics in this thread, however the goal is the same: caching of Docker images, this way or another)
b