https://pantsbuild.org/ logo
#general
Title
# general
w

worried-painter-31382

12/08/2022, 9:21 AM
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

curved-television-6568

12/08/2022, 1:26 PM
yeah, that sounds like it should. mind filling a bug for this? 🙏 🙂
w

worried-painter-31382

01/15/2023, 12:17 PM
Finally got around to writing this https://github.com/pantsbuild/pants/issues/18004
6 Views