Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

User could be warned if an illegal image name is specified #206

Open
michael-borkowski opened this issue Mar 18, 2016 · 2 comments
Open
Labels
help wanted pinned exempted from stalebot

Comments

@michael-borkowski
Copy link

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
@mattnworb
Copy link
Member

I think this is more of an issue with https://github.com/spotify/docker-client/ than this plugin. The client checks if the name of a container is valid when creating or renaming a container, but doesn't have similar checks when building an image.

@stale
Copy link

stale bot commented Sep 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2018
@davidxia davidxia added the pinned exempted from stalebot label Sep 11, 2018
@stale stale bot removed the stale label Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted pinned exempted from stalebot
Projects
None yet
Development

No branches or pull requests

3 participants