I am all for adding the
--cache-from option to
tutor images build. But let me tell you about my dilemma: ideally, I would like to transparently forward all
docker build options passed to
tutor images build, pretty much like it is done in
tutor local run. My problem is that the
tutor images build command already has a variadic argument. This variadic argument makes it possible to build multiple images at once:
tutor images build openedx forum ...
I would like to be able to capture all the extra arguments that come before the list of images and transparently forward them to
tutor images build --opt1 arg1 --opt2=arg2 openedx
# calls: docker build --opt1 arg1 --opt2=arg2 -t docker.io/overhangio/openedx:12.0.4 ~.local/share/tutor/env/build/openedx
My problem is that to enable this feature we will need two variadic arguments, which is impossible. The alternative is to explicitly define all the
docker build options that are actually supported by
tutor images build. But this list is bound to become bigger and bigger. And everytime we add a new option, it needs to be properly documented.
A possible solution would be to parse extra
docker build arguments as an environment variable (with ;-separated values). For instance:
tutor images build openedx forum
Would that work for you? If yes, please feel free to open a PR.