-
Notifications
You must be signed in to change notification settings - Fork 572
Simple example fails with "is not a valid repository/tag" #264
Comments
This sounds like it might be an issue with your version of Docker rather than the plugin. What version are you running? For instance see
Do you get the same error if you create a Dockerfile and attempt to build and tag an image with the same name? This would rule out the plugin. |
I'm using Docker 1.12. No, I do not get the same error. As far as I remember, I don't get any error at all, although I don't know whether it succeeded, either. I can't check the results at this moment. I'll do that in a couple of hours and report back here. |
After getting my docker configuration working, I'm able to successfully build the image with "docker build", but "mvn docker:build" still fails with the same error. |
@davidmichaelkarr did you run just |
Ah, I was only building the image, not tagging it. I then get the same error. This reminded me of something I read somewhere about the tag name not allowing uppercase characters. I changed the name to "ordersimage", and it worked perfectly fine. I need to review the details of that limitation. You'd think they would give you a TEENY bit more information about why it's invalid. |
Glad we at least figured out where the problem is coming from. I'll go ahead and close this then. |
thanks for sharing. |
Wow, yes I hit this too and this post helped me solve. IMO this is a bug. There should be a better error message or allow upper case letters! Perhaps even any documentation as such since https://docs.docker.com/engine/reference/commandline/tag/ says you can tag images with uppercase letters. build -t tags doesn't follow that same logic |
the tag name not allowing uppercase characters. Or current docker version not support multiple stages build. |
UPDATE DOCKER to 17.05+ is ok. |
Also note that multistage builds ( In an older dockerd that can also lead to a very similar error message. For example:
Source: https://docs.docker.com/engine/userguide/eng-image/multistage-build/
|
Same problem, Update DOCKER to 17.05+ is ok. |
this is an issue on 1.13.1
|
observing the same |
yep, this was my issue! |
I originally filed this problem under #261 , but that was seen to be reporting a trivial problem that I don't care about, which had to do with passing full error information from docker to the plugin. I need to focus on my real problem that is causing the error, not with the plugin failing to report the full error message.
My current build is sort of like the example in the readme at "Use a Dockerfile", but even simpler than that.
My current POM is just this:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>orderProcessingDashboard</groupId> <artifactId>ordersImage</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <build> <plugins> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <configuration> <registryUrl>http://<enterprise registry host and port></registryUrl> <dockerDirectory>src/docker</dockerDirectory> <imageName>ordersImage</imageName> </configuration> </plugin> </plugins> </build> </project>
My src/docker/Dockerfile is just this:
FROM tomee:8-jdk-7.0.0-webprofile
When I run "mvn docker:build", I see the following in /var/log/messages:
Aug 13 09:23:23 wacdtl01dk068x dockerd: time="2016-08-13T09:23:23.364116278-07:00" level=error msg="Handler for POST /build returned error: Error parsing reference: \"ordersImage\" is not a valid repository/tag"
As you can see, comparing it to the example in the doc, my image name is "ordersImage", not "example", and I'm not copying any additional resources (yet).
Is the doc simply incorrect? What else could I be doing wrong?
The text was updated successfully, but these errors were encountered: