Question about docker build args and pants depende...
# general
w
Question about docker build args and pants dependency inference. We use the pattern
Copy code
ARG SOME_IMAGE="path/to/some-image/target"
FROM $SOME_IMAGE
for dev builds, letting pants build the image dependency. However, in our CI pipeline we often host the image
FROM
images in our internal registry, so we use
--docker-build-arg "SOME_IMAGE=<some-image-uri>
. This works for building the image, but pants is also still building the
path/to/some-image/target
only to then not use it. Is this a bug or a feature? 🙂 It's problematic for us because we do not have internet access in our builds, but
some-image
uses
apt
. We would prefer if pants inspected the build args before resolving image dependencies, to not trigger docker builds that are not going to be used.
c
yeah, that sounds like it should. mind filling a bug for this? 🙏 🙂
w
Finally got around to writing this https://github.com/pantsbuild/pants/issues/18004