dockerfile-plus icon indicating copy to clipboard operation
dockerfile-plus copied to clipboard

Using INCLUDE+ with parametrized builds

Open nyurik opened this issue 4 years ago • 1 comments

Hi, would it be possible to use INCLUDE+ with parameterized builds? PostGIS repo uses this approach, where several basic templates are used with bash param substitution to build many different images. In an ideal case, there would be a simple dockerfile that sets up a few ARG/ENV parameters before importing a common file. Also, are there any limitations to the INCLUDE+, e.g. with multi-stage builds, etc?

Thanks for an awesome extension, sad that upstream hasn't resolved these types of use cases despite user's requests.

nyurik avatar Apr 18 '21 00:04 nyurik

In my experiments this works (well env stays on default during build) You can see this here and here.

barcode avatar Apr 27 '21 13:04 barcode