adoptium / containers

Repo containing the dockerfiles and scripts to produce the official eclipse-temurin containers.
https://hub.docker.com/_/eclipse-temurin/
Apache License 2.0
204 stars 87 forks source link

Fix CA certificate processing when a certificate is a symlink #558

Closed rassie closed 1 month ago

rassie commented 1 month ago

Usually, a certificate in a mount will be a regular file. However in some environments, like when providing certificates via a ConfigMap in a Kubernetes context, the certificate file will be a symlink. Our CA certificate processing copies certificate files to a new location and since the symlink targets are hidden files in the same directory, those do not get copied along and symlinks could become broken. This patch dereferences symlinks when copying to avoid broken links.

Fixes: https://github.com/adoptium/containers/issues/498