In the earlier docker version this wasn't possible, but now after the introdiction of multi-stage builds, the user can provide an argument before FROM. SOmething like this:
# default to eu-north-1
ARG region=eu-north-1
FROM aws.ecr.huge.url.${region}/repo:php-apache
Also, the arguments are namespaced. Therefore, when you define them before a FROM line, they're available to FROM until the end of stage. To use args in multiple namespaces, you'll have to define it every time.