首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有JHipster和Docker注册表的Gitlab CI/CD

带有JHipster和Docker注册表的Gitlab CI/CD
EN

Stack Overflow用户
提问于 2020-04-28 18:01:42
回答 2查看 780关注 0票数 1

我创建了一个JHipster应用程序,我想添加CI/CD和一个私有Gitlab运行程序,以便部署在私有Docker注册中心上。我明白这个失败:

代码语言:javascript
复制
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.0.0:build (default-cli) on project powerfront: Invalid image reference :master-35274d52bd71e28f08a0428832001cc67e9c446d, perhaps you should check that the reference is formatted correctly according to https://docs.docker.com/engine/reference/commandline/tag/#extended-description
 [ERROR] For example, slash-separated name components cannot have uppercase letters: Invalid image reference: :master-35274d52bd71e28f08a0428832001cc67e9c446d

这是我的..gitlab ci.yml的相关部分

代码语言:javascript
复制
# Uncomment the following line to use gitlabs container registry. You need to adapt the REGISTRY_URL in case you are not using gitlab.com
docker-push:
    stage: release
    variables:
        REGISTRY_URL: 10.1.10.58
        IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA
    dependencies:
        - maven-package
    script:
        - ./mvnw -ntp compile jib:build -Pprod -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token  -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME

编辑:有一个未配置的变量。现在我得到了

代码语言:javascript
复制
 [ERROR] I/O error for image [10.1.10.58:5000/powerfront]:
 [ERROR]     javax.net.ssl.SSLException
 [ERROR]     Unrecognized SSL message, plaintext connection?

我如何告诉运行者接受不安全(明文)连接?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-05-01 09:54:50

若要发布到私有(或其他公共)注册表,您的映像名必须以注册表的主机名启动:private.registry.io/group/image:version,以便Docker守护进程知道它不会推送到Docker (默认情况下),而是推到private.registry.io

此外,您还可以使用Kaniko发布您的映像,因为它不需要在Docker守护进程上使用dind或特权模式。

票数 2
EN

Stack Overflow用户

发布于 2020-04-28 18:16:03

我不确定这是不是Gitlab CI的问题。但对JHipster来说。

CI_REGISTRY_IMAGE的价值是什么?我们看不到错误消息中的值。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61486895

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档