-
Notifications
You must be signed in to change notification settings - Fork 564
User could be warned if an illegal image name is specified #206
Description
Description
I have struggled for some time now with a strange problem, where mvn docker:build failed; amongst the error output, "Connection Reset" was found. I finally figured out what caused the issue: My maven project's artifact ID had upper-case letters in it, and I am using ${myPrefix}/${project.artifactId} as the image name. However, docker seems to not allow upper-case letters for images names.
Not only was I aware of this limitation, I got a confusing error message. It would increase usability and reduce frustration if a check for the repository name was performed by the plug-in, or at least the error message coming from docker (which I see in the docker logs: Handler for POST /build returned error: Invalid repository name (myProject), only [a-z0-9-_.] are allowed) somehow shown in the output.
How to reproduce
- Specify upper-case letters as an image name
mvn package docker:build
What do you expect
An error message notifying me of the fact hat docker does not allow upper-case letters as an image name, be it coming from the plugin or from docker itself.
What happened instead
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.3:build (default-cli) on project myProject: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException: Cannot retry request with a non-repeatable request entity: Connection reset by peer -> [Help 1]
Software:
- docker version: client 1.6.2, server 1.6.2
- docker-maven-plugin version: 0.4.3
- maven version: 3.3.3