首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将自定义SSL证书注入springbok bootBuildImage

如何将自定义SSL证书注入springbok bootBuildImage
EN

Stack Overflow用户
提问于 2020-05-28 01:12:24
回答 1查看 629关注 0票数 5

我不确定是否有可能在不使用自定义基础镜像的情况下使用,但我正在尝试使用自签名SSL证书在企业防火墙后面构建镜像:

代码语言:javascript
复制
> Task :bootBuildImage
Caching disabled for task ':bootBuildImage' because:
  Build cache is disabled
Task ':bootBuildImage' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Building image 'docker.io/library/temp:latest'

 > Pulling builder image 'gcr.io/paketo-buildpacks/builder:base-platform-api-0.3' ..................................................
 > Pulled builder image 'gcr.io/paketo-buildpacks/builder@sha256:200fb7945ef0f4a3c79befb1262fd592f54ba7b7ffcc8a37716434dd11d0e5e9'
 > Pulling run image 'gcr.io/paketo-buildpacks/run:base-cnb' ..................................................
 > Pulled run image 'gcr.io/paketo-buildpacks/run@sha256:f7f27462fb513a70370322ada08440a642d24a700056d4c6b8cbb344610bf486'
 > Executing lifecycle version v0.7.5
 > Using build cache volume 'pack-cache-739c2c210811.build'

 > Running creator
    [creator]     ---> DETECTING
    [creator]     ======== Results ========
    [creator]     pass: paketo-buildpacks/bellsoft-liberica@2.7.1
    [creator]     skip: paketo-buildpacks/gradle@1.2.2
    [creator]     skip: paketo-buildpacks/maven@1.4.2
    [creator]     skip: paketo-buildpacks/sbt@1.2.2
    [creator]     pass: paketo-buildpacks/executable-jar@1.2.5
    [creator]     pass: paketo-buildpacks/apache-tomcat@1.1.5
    [creator]     pass: paketo-buildpacks/dist-zip@1.3.2
    [creator]     pass: paketo-buildpacks/spring-boot@1.5.5
    [creator]     skip: paketo-buildpacks/procfile@1.3.5
    [creator]     skip: paketo-buildpacks/azure-application-insights@1.2.1
    [creator]     skip: paketo-buildpacks/debug@1.2.5
    [creator]     skip: paketo-buildpacks/google-stackdriver@1.2.1
    [creator]     skip: paketo-buildpacks/jmx@1.1.5
    [creator]     skip: paketo-buildpacks/encrypt-at-rest@1.2.5
    [creator]     skip: paketo-buildpacks/image-labels@1.0.5
    [creator]     Resolving plan... (try #1)
    [creator]     fail: paketo-buildpacks/bellsoft-liberica@2.7.1 provides unused jdk
    [creator]     Resolving plan... (try #2)
    [creator]     skip: paketo-buildpacks/executable-jar@1.2.5 requires jre
    [creator]     skip: paketo-buildpacks/apache-tomcat@1.1.5 requires jre
    [creator]     skip: paketo-buildpacks/dist-zip@1.3.2 requires jre
    [creator]     fail: paketo-buildpacks/bellsoft-liberica@2.7.1 provides unused jdk
    [creator]     Resolving plan... (try #3)
    [creator]     5 of 15 buildpacks participating
    [creator]     paketo-buildpacks/bellsoft-liberica 2.7.1
    [creator]     paketo-buildpacks/executable-jar    1.2.5
    [creator]     paketo-buildpacks/apache-tomcat     1.1.5
    [creator]     paketo-buildpacks/dist-zip          1.3.2
    [creator]     paketo-buildpacks/spring-boot       1.5.5
    [creator]     ---> ANALYZING
    [creator]     Analyzing image "c48997fb4f4f2e07e64033a33545298861d1f71f6a11a992bbb17cc84ecefee5"
    [creator]     ---> RESTORING
    [creator]     ---> BUILDING
    [creator]
    [creator]     Paketo BellSoft Liberica Buildpack 2.7.1
    [creator]         Set $BPL_JVM_HEAD_ROOM to configure the headroom in memory calculation. Default 0.
    [creator]         Set $BPL_JVM_LOADED_CLASS_COUNT to configure the number of loaded classes in memory calculation. Default 35% of classes.
    [creator]         Set $BPL_JVM_THREAD_COUNT to configure the number of threads in memory calculation. Default 250.
    [creator]         Set $BP_JVM_VERSION to configure the Java version. Default 11.*.
    [creator]       BellSoft Liberica JRE 8.0.252: Contributing to layer
    [creator]         Downloading from https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jre8u252+9-linux-amd64.tar.gz
    [creator]     unable to invoke layer creator
    [creator]     unable to get dependency jre
    [creator]     unable to download https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jre8u252+9-linux-amd64.tar.gz
    [creator]     unable to request https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jre8u252+9-linux-amd64.tar.gz
    [creator]     Get "https://github.com/bell-sw/Liberica/releases/download/8u252+9/bellsoft-jre8u252+9-linux-amd64.tar.gz": x509: certificate signed by unknown authority
    [creator]     ERROR: failed to build: exit status 1

这是日志->我想知道是否有一种方法可以将SSL证书注入到基本容器中……

谢谢

EN

回答 1

Stack Overflow用户

发布于 2020-05-31 15:29:43

您是否尝试过以下环境变量:

  • DOCKER_TLS_VERIFY设置为1时启用安全HTTPS协议(可选) HTTPS的证书和密钥文件的
  • DOCKER_CERT_PATH路径(如果为DOCKER_TLS_VERIFY=1,则为必填项,否则将被忽略)

参考:https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/gradle-plugin/reference/html/#build-image

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

https://stackoverflow.com/questions/62048924

复制
相关文章

相似问题

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