-
Notifications
You must be signed in to change notification settings - Fork 652
Closed
Description
Description
Building from a Dockerfile like the one below:
ARG IMAGE_NAME=alpine
ARG IMAGE_TAG=latest
ARG FULL_IMAGE=${IMAGE_NAME}:${IMAGE_TAG}
FROM ${FULL_IMAGE}
results in the error below:
Caused by: java.lang.IllegalArgumentException: Illegal group reference
at java.util.regex.Matcher.appendExpandedReplacement (Matcher.java:1113)
at java.util.regex.Matcher.appendReplacement (Matcher.java:1043)
at java.util.regex.Matcher.replaceFirst (Matcher.java:1446)
at java.lang.String.replaceFirst (String.java:3025)
at io.fabric8.maven.docker.util.DockerFileUtil.resolveImageTagFromArgs (DockerFileUtil.java:189)
at io.fabric8.maven.docker.util.DockerFileUtil.extractBaseImages (DockerFileUtil.java:70)
This is because DockerFileUtil.resolveImageTagFromArgs
doesn't recursively resolve the args, and the curly brackets of the inner arg breaks the Pattern replacement.
Info
- docker-maven-plugin version: 0.44.0
- Maven version (
mvn -v
): 3.9.8 - Docker version: 27.0.3
Metadata
Metadata
Assignees
Labels
No labels