I'd like to be able to control the source of a file (Java Archive) in a Dockerfile
which is either a download (with curl
) or a local file on the same machine I build the Docker image.
I'm aware of ways to control RUN
statements, e.g. Conditional ENV in Dockerfile, but since I need access to the filesystem outside the Docker build image, a RUN
statement won't do. I'd need a conditional COPY
or ADD
or a workaround.
I'm interested in built-in Docker functions/features which avoid the use of more than one Dockerfile or wrapping the Dockerfile
in a script using templating software (those just workarounds popping into my head).