Say we have a Dockerfile like so:
FROM node:9
and we build it with:
docker build -t foo .
my question is - is there a way to change the FROM clause using a --build-arg
, something like this:
ARG NODE_VERSION
FROM node:$NODE_VERSION
and the build that with:
docker build -t foo --build-arg NODE_VERSION="8" .