Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can an entrypoint be provided for Java truststore set-up? #314

Open
vlk-charles opened this issue Jun 11, 2024 · 2 comments
Open

Can an entrypoint be provided for Java truststore set-up? #314

vlk-charles opened this issue Jun 11, 2024 · 2 comments

Comments

@vlk-charles
Copy link

#303 disabled the upstream entrypoint, which is __cacert_entrypoint.sh (at least in eclipse-temurin:8-jdk-jammy). This script can help set up the Java truststore. Can the functionality be reintroduced? It seems to me like setting up the truststore before Tomcat start-up would be a common use case. The script even acknowledges and deals with the issue for which it was bypassed:

#!/usr/bin/env bash
# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details

However, I just found a recent change that switches this to sh again.

#!/usr/bin/env sh
# Converted to POSIX shell to avoid the need for bash in the image
@tianon
Copy link
Member

tianon commented Jun 11, 2024

See docker-library/docs#2338 (comment) for my opinions about that entrypoint (also, we support more than just eclipse-temurin here, so it would be inconsistent behavior). There's some more recent in docker-library/docs#2445 (comment) and an even better / more generic proposal in adoptium/containers#573.

@vlk-charles
Copy link
Author

Just FYI, this is what I am doing in my Dockerfile now:

FROM tomcat:9.0-jdk8
ENTRYPOINT ["/__cacert_entrypoint.sh"]
CMD ["catalina.sh", "run"]
ENV USE_SYSTEM_CA_CERTS=1
...

and then if I want custom certificates at container run time, I mount a volume over /usr/local/share/ca-certificates (or /certificates).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants