I am trying to build a Dockerfile that builds my project for multiple base images (e.g., Ubuntu 17.10 for multiple architectures)
I want to be able to write something like
FROM {{ ARCH }}/ubuntu:17.10
...
And have it resolve at build time to ubuntu:17.10 or ppc64le/ubuntu:17.10. Is there someway to do this?
Additionally a separate solution might be to have two docker files, but somehow include the common portions of the file into both the docker files.
You can use a build argument and use docker build --build-arg foo=bar to build the image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With