Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was 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

Description

@michael-borkowski

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions