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

带有JHipster和Docker注册表的Gitlab CI/CD,docker,jhipster,gitlab-ci,docker-registry,Docker,Jhipster,Gitlab Ci,Docker Registry,我制作了一个JHipster应用程序,我想添加一个带有私有Gitlab运行程序的CI/CD,以便部署到私有Docker注册表上。我得到这个失败: [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-35274d52bd71e28f08a042883

我制作了一个JHipster应用程序,我想添加一个带有私有Gitlab运行程序的CI/CD,以便部署到私有Docker注册表上。我得到这个失败:

[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
这是my.gitlab-ci.yml的相关部分

# 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
编辑:存在未配置的变量。现在我明白了

 [ERROR] I/O error for image [10.1.10.58:5000/powerfront]:
 [ERROR]     javax.net.ssl.SSLException
 [ERROR]     Unrecognized SSL message, plaintext connection?

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

我不确定这是否是Gitlab CI的问题。但是有了JHipster。
CI\u REGISTRY\u IMAGE
的值是多少?我们在错误消息中没有看到值。

要发布到私有(或另一个公共)注册表,您的映像名必须以注册表的主机名开头:
private.registry.io/group/image:version
,以便Docker守护进程知道它不会推送到Docker Hub(默认设置)而是推送到
private.registry.io


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

您是否尝试使用这些gitlab变量?CI_REGISTRY_用户和CI_REGISTRY_密码?要接受不安全的注册表,您必须配置守护程序:我不熟悉jib,我宁愿使用用户Kaniko:在我的CI管道上推送图像如果使用jib,您可以将脚本设置为:mvn jib-Djib.allowInsecureRegistries=true或在pom.xml中设置标志?