Following the recommendations here, these recommendations are how to pass SSL certificates into a build image using Spring Boot's plugin for maven.
- I have this in my pom.xml:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<bindings>
<binding>${basedir}/bindings/certificates:/platform/bindings/ca-certificates</binding>
</bindings>
</image>
</configuration>
</plugin>
- I have the directory structure:
project |-bindings |-certificates |-type |-certificate.crt
- type file contains:
$ cat bindings/certificates/type
ca-certificates
- However, I am getting this error:
$ ./mvnw spring-boot:build-image
...
...
...
[INFO] > Running creator
[INFO] [creator] ===> ANALYZING
[INFO] [creator] Restoring data for SBOM from previous image
[INFO] [creator] ===> DETECTING
[INFO] [creator] ======== Output: paketo-buildpacks/git@1.0.1 ========
[INFO] [creator] failed to load bindings from '/platform/bindings': failed to read binding 'ca-certificates': missing 'type'
[INFO] [creator] err: paketo-buildpacks/git@1.0.1 (1)
[INFO] [creator] ======== Output: paketo-buildpacks/git@1.0.1 ========
[INFO] [creator] failed to load bindings from '/platform/bindings': failed to read binding 'ca-certificates': missing 'type'
[INFO] [creator] err: paketo-buildpacks/git@1.0.1 (1)
...
...
...
[INFO] [creator] Using Java version 17 extracted from MANIFEST.MF
[INFO] [creator] BellSoft Liberica JRE 17.0.5: Contributing to layer
[INFO] [creator] Downloading from https://github.com/bell-sw/Liberica/releases/download/17.0.5+8/bellsoft-jre17.0.5+8-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/17.0.5+8/bellsoft-jre17.0.5+8-linux-amd64.tar.gz
[INFO] [creator] unable to request https://github.com/bell-sw/Liberica/releases/download/17.0.5+8/bellsoft-jre17.0.5+8-linux-amd64.tar.gz
[INFO] [creator] Get "https://github.com/bell-sw/Liberica/releases/download/17.0.5+8/bellsoft-jre17.0.5+8-linux-amd64.tar.gz": x509: certificate signed by unknown authority
[INFO] [creator] ERROR: failed to build: exit status 1
...
...
...
As mentioned above, there is most definitely is a bindings/certificates/type file containing the word ca-certificates
I have confirmed the 'basedir' property to make sure it wasn't wonky using:
$ mvn help:evaluate -Dexpression=basedir -q -DforceStdout
/my_repo/uservices/restservice_example
And this is correct.
- I am running this inside a Docker container which I'm trying to use as a gitlab-runner executor. The strangest part about this error is that I can run it on my host machine without issue. For some reason, the identical build with identical certificate does not work inside the container.
Can anyone recommend any tips for troubleshooting/solving?