docker - appId: error.pattern 在 Marathon 中创建应用程序时
问题描述
我正在尝试使用 Web 控制台在 Marathon 中创建一个应用程序。这是 JSON 文件:
{
"id": "TestSpringApplication",
"cmd": "/usr/bin/java -jar -Dspring.profiles.active=test /spring-boot-rest-example-0.5.0.war",
"cpus": 1,
"mem": 32.0,
"networks": [ { "mode": "container/bridge" } ],
"container": {
"type": "DOCKER",
"docker": {
"image": "openjdk:8-jre-alpine"
},
"portMappings": [
{ "containerPort": 8090, "hostPort": 8090 }, {"containerPort": 8091, "hostPort": 8091 }],
"volumes" : [
{
"containerPath": "/",
"mode": "RW",
"hostPath": "/root/spring-boot-rest-example/target"
}
]
}
}
但是当我把它放在盒子里时,它出现了这个错误:
你的配置有问题
appId:error.pattern
有人面临这个问题吗?我搜索了很多文档,但没有找到任何有用的信息
解决方案
AppID
(又名PathID
必须满足某些标准
由一系列由斜杠分隔的名称组成的 pod 的唯一标识符。每个名称必须至少包含 1 个字符,并且只能包含数字 (
0-9
)、破折号 (-
)、点 (.
) 和小写字母 (a-z
)。名字不能开始
并匹配
^(\/?((\.\.)|(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9]))?($|\/))+$
推荐阅读
- hadoop - Hive:如何处理包含不固定数量字段的文件?
- python - 如何解析没有根元素的 JSON 字符串?
- macos - 任何适用于 Mac 的 SVN GUI 客户端都能够比较属性更改吗?
- javascript - SVG箭头跟随线方向
- sql-server - 带有 sql 数据库的 vb.net 应用程序
- ubuntu - 如何修复 JetBrains 产品(WebStorm、IDEA)中的 Ubuntu 非拉丁键盘快捷键?
- r - xts - 根据某些条件删除行
- java - 有没有办法使用“groupingBy”为嵌套结构中的多个元素收集地图?
- javascript - 谷歌饼图 - 图像作为标签
- azure - 使用 AzureML 通过数据存储上传数据时出现 403 错误