Skip to content

Commit

Permalink
fix ca certs in server tag
Browse files Browse the repository at this point in the history
  • Loading branch information
zyclonite committed Feb 6, 2024
1 parent 6d1c8bb commit 7a79c7f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@ RUN apt-get update && \
mkdir -p /usr/local/openjdk && \
cd /usr/local/openjdk && \
tar -xf /tmp/openjdk.tar.gz --strip-components=1 && \
curl -LfsSo /tmp/noenv.ca.crt https://noenv.com/ca.pem && \
echo "2ecfa5dafd7d5e47313953ae0278f59657f9e3c8f8ee8b99b9cf5d31d45fd4dd */tmp/noenv.ca.crt" | sha256sum -c - && \
/usr/local/openjdk/bin/keytool -import -noprompt -trustcacerts -cacerts -storepass changeit -alias noenvca -file /tmp/noenv.ca.crt && \
rm -rf /tmp/openjdk.tar.gz /tmp/noenv.ca.crt
rm -rf /tmp/openjdk.tar.gz

RUN /usr/local/openjdk/bin/jlink \
--no-header-files \
--no-man-pages \
--add-modules java.base,java.prefs,java.naming,java.management,java.logging,java.sql,java.xml,java.xml.crypto,java.compiler,java.instrument,java.desktop,jdk.management,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.localedata,jdk.naming.dns,jdk.unsupported,java.security.jgss \
--include-locales en-US,zh-CN,ru-RU,fr-FR,es-ES,en-GB,de-DE,pt-BR,en-CA,es-MX,it-IT,ja-JP \
--compress 2 \
--compress zip-6 \
--output /usr/local/openjdk-slim

RUN curl -LfsSo /tmp/noenv.ca.crt https://noenv.com/ca.pem && \
echo "2ecfa5dafd7d5e47313953ae0278f59657f9e3c8f8ee8b99b9cf5d31d45fd4dd */tmp/noenv.ca.crt" | sha256sum -c - && \
/usr/local/openjdk/bin/keytool -import -noprompt -trustcacerts -keystore /usr/local/openjdk-slim/lib/security/cacerts -storepass changeit -alias noenvca -file /tmp/noenv.ca.crt && \
rm -rf /tmp/noenv.ca.crt

FROM debian:bookworm-slim

ENV LANG=en_US.UTF-8 \
Expand Down

0 comments on commit 7a79c7f

Please sign in to comment.