-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker:push failed with ARG in FROM #1778
Comments
Thank you for the quick reply. I have tried 0.45-SNAPSHOT, but it is the same error message. It seems to be the same environment as #1756, however the docker:build is successful, only the docker:push fails. As an addition, the ARG is set with a property "docker.buildArg.baseImage". The ARG section in the BUILD has been removed. |
@ChristianKnof : Thanks for reporting! I can reproduce the issue. |
Any updates? |
@nodece : Let me provide a fix this week. |
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}
mvn -v
) : 3.9.4The text was updated successfully, but these errors were encountered: