I want to replace WORKDIR /opt/app with a global ARG, but it does not work:
ARG BUILD_IMAGE=maven:3.8.4-eclipse-temurin-11
ARG APP=/opt/app
FROM $BUILD_IMAGE as dependencies
#WORKDIR /opt/app #this would pass!
WORKDIR ${APP}
Result:
Error response from daemon: cannot normalize nothing
Failed to deploy Dockerfile': Can't retrieve image ID from build stream
Why?