I'm trying to build a docker image using a variable for my FROM docker base image
Docker Compose
version: "3.7"
services:
app:
build:
context: "."
dockerfile: .docker/Dockerfile
working_dir: /ionic-app
environment:
NODE_VER: 12.16.0
Dockerfile
# Create Basic docker file
FROM node:${NODE_VER}
But this doesn't work I get, I've read that this isn't possible or that you need to add build arguments for this to work?
ERROR: Service 'ionic-app' failed to build: invalid reference format
Is this possible? I want to make it so when Node updates their LTS version I'll easily be able to change versions via arguments.