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

ARG support in INCLUDE and "FROM with relative paths"

Open mickroll opened this issue 1 year ago • 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.

mickroll avatar Jan 30 '24 17:01 mickroll