Is there a way to use variables inside of a Dockerfile? I’m not talking about setting system variables for the container, but rather using variables within the Dockerfile itself.
For example, if the version of software I was downloading and installing changed a lot, it would be nice to do something like:
FROM centos:centos6 SOFTWARE_VERSION=testPackage-1.0 # Install Software and remove RPM RUN wget http://server.com/$SOFTWARE_VERSION.rpm RUN rpm ivh $SOFTWARE_VERSION.rpm RUN rm -rf $SOFWARE_VERSION.rpm
Is something like this possible? Or has it been considered?