Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker repository name component must match

I am trying to build my image using this plugin: https://github.com/spotify/docker-maven-plugin#use-a-dockerfile

When I run mvn clean package docker:build

I get this error:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (defa
ult-cli) on project demo: Exception caught: Request error: POST https://192.168.
99.100:2376/v1.12/build?t=DevOpsClient: 500: HTTP 500 Internal Server Error -> [
Help 1]

When I check the docker daemon logs, I see this:

Handler for POST /build returned error: repository name component must match \"[a-z0-9]+(?:[._-][a-z0-9]+)*\"" statusCode=500

Here is the doc for the naming convention: https://docs.docker.com/registry/spec/api/

Apparently you cannot have any upper case letters.

I am trying to build using Spring boot my following this guide: https://spring.io/guides/gs/spring-boot-docker/

I am using a SNAPSHOT release of spring boot and I have a directory named demo-0.1.1-SNAPSHOT. I believe this may be causing the problem.

Also I am working on windows and my project directory path is like:

C:\Users\myname\UserRegistrationClient\git\..... etc

Would this also affect the repository naming convention?

And how would I change it?

like image 645
Kingamere Avatar asked Aug 14 '15 15:08

Kingamere


1 Answers

So this regular expression: [a-z0-9]+(?:[._-][a-z0-9]+)* doesn't include any upper case letters. So you should change your image name to devopsclient

like image 150
Rico Avatar answered Nov 06 '22 19:11

Rico