spring-boot: Spring Boot maven plugin build-image will not work behind a http proxy with custom certificate

Hi,

Spring Boot 2.3.1 maven plugin build-image will not work behind a http proxy with custom certificate. The certificate is installed under linux (ubuntu 20.04) how to do it including the settings for Java (open jdk 11.0.7).

When building an image with

mvn spring-boot:build-image

INFO]     [creator]     Paketo BellSoft Liberica Buildpack 2.8.0
[INFO]     [creator]       https://github.com/paketo-buildpacks/bellsoft-liberica
[INFO]     [creator]       Build Configuration:
[INFO]     [creator]         $BP_JVM_VERSION              11.0.7          the Java version
[INFO]     [creator]       Launch Configuration:
[INFO]     [creator]         $BPL_JVM_HEAD_ROOM           0               the headroom in memory calculation
[INFO]     [creator]         $BPL_JVM_LOADED_CLASS_COUNT  35% of classes  the number of loaded classes in memory calculation
[INFO]     [creator]         $BPL_JVM_THREAD_COUNT        250             the number of threads in memory calculation
[INFO]     [creator]       BellSoft Liberica JRE 11.0.7: Contributing to layer
[INFO]     [creator]         Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jre11.0.7+10-linux-amd64.tar.gz
[INFO]     [creator]     unable to invoke layer creator
[INFO]     [creator]     unable to get dependency jre
[INFO]     [creator]     unable to download https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jre11.0.7+10-linux-amd64.tar.gz
[INFO]     [creator]     unable to request https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jre11.0.7+10-linux-amd64.tar.gz
[INFO]     [creator]     Get "https://github.com/bell-sw/Liberica/releases/download/11.0.7+10/bellsoft-jre11.0.7+10-linux-amd64.tar.gz": x509: certificate signed by unknown authority

Other tools like curl or docker show me that the installation of the custom certifactes is correct.

I know my setup is crazy, but unfortunately I can’t change that.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 15 (7 by maintainers)

Most upvoted comments

The image is built by a builder that runs in a separate Docker container. Your custom certificate will have to be installed in that container. I’m not sure if the builder provides a hookpoint to provide a custom certificate to use during the build process. You may need to create your own builder image. The Paketo Slack is the best place to discuss this and to find out what’s possible.