devthefuture-org/dockerfile-x

ARG support in INCLUDE and "FROM with relative paths"

mickroll opened this issue · 1 comments

Currently, the INCLUDE and FROM do not work with supplied build-args, eg.:

ARG BASE_DOCKERFILE
INCLUDE ./path/${BASE_DOCKERFILE}

or

ARG BASE_DOCKERFILE
FROM ./path/${BASE_DOCKERFILE}

This is in contrast to vanilla dockerfile where this example works:

ARG JDK_VERSION
FROM azul/zulu-openjdk-alpine:${JDK_VERSION}

$ docker build --build-arg JDK_VERSION=17.0.9 build -f Dockerfile.build .

It would be really nice to have ARG support for INCLUDE and FROM with Relative Paths.

I think it's a good idea,
but not too much time for this now,
PR are welcome to implement this feature
I will also add this to my long term TODO list