-
Notifications
You must be signed in to change notification settings - Fork 650
Description
Description
As seen in the example [dockerfile-base-as-arg|https://github.com/fabric8io/docker-maven-plugin/blob/master/it/dockerfile-base-as-arg/src/main/docker/Dockerfile] we tried to parametrize our docker-builds, the docker:build works fine, but the following docker:push crashes with:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.44.0:push (default-cli) on project xxx: Execution default-cli of goal io.fabric8:docker-maven-plugin:0.44.0:push failed: Given Docker name '${baseImage}' is invalid:
[ERROR] * image part '${baseImage}' doesn't match allowed pattern '[a-z0-9]+(?:(?:(?:[.]|__|[-]*)[a-z0-9]+)+)?(?:(?:/[a-z0-9]+(?:(?:(?:[.]|__|[-]*)[a-z0-9]+)+)?)+)?'
Info
OUR: Property:
<docker.buildArg.baseImage>privateImageRegistry/privateImage:CustomTag</docker.buildArg.baseImage>
OUR-Configuration:
<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <configuration> <images> <image> <name>${docker-registry.url}/${project.artifactId}:${project.version}</name> <build> <contextDir>${project.basedir}</contextDir> <dockerFile>${project.basedir}/docker/Dockerfile</dockerFile> <noCache>true</noCache> </build> </image> </images> </configuration> </plugin>
OUR simplified Dockerfile:
ARG baseImage FROM ${baseImage}
- docker-maven-plugin version : 0.44.0
- Maven version (
mvn -v
) : 3.9.4