docker 存储库名称组件必须匹配

问题描述 投票:0回答:1

我正在尝试使用此插件构建我的图像:https://github.com/spotify/docker-maven-plugin#use-a-dockerfile

当我跑步时

mvn clean package docker:build

我收到此错误:

[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]

当我检查 docker 守护进程日志时,我看到这个:

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

这是命名约定的文档:https://docs.docker.com/registry/spec/api/

显然你不能有任何大写字母。

我正在尝试按照本指南使用 Spring boot 进行构建:https://spring.io/guides/gs/spring-boot-docker/

我正在使用 Spring Boot 的 SNAPSHOT 版本,并且有一个名为 demo-0.1.1-SNAPSHOT 的目录。我相信这可能是导致问题的原因。

我也在 Windows 上工作,我的项目目录路径如下:

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

这也会影响存储库命名约定吗?

我该如何改变它?

docker spring-boot boot2docker dockerfile docker-registry
1个回答
24
投票

所以这个正则表达式:

[a-z0-9]+(?:[._-][a-z0-9]+)*
不包含任何大写字母。所以你应该将图像名称更改为
devopsclient

© www.soinside.com 2019 - 2024. All rights reserved.