Dockerfile: a CA bundle split for Java's keystore; no syntax image

Java's keystore takes only a file's first certificate, so a bundle given
as the ca secret is split into one file for each. The syntax line made
the build fetch docker/dockerfile from Docker Hub; the built-in frontend
has secret mounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
This commit is contained in:
Claude committed 2026-10-19 02:41:12 +00:00
1 parent aed9ab62cc
commit a34edde3d0
1 file changed
+5 -3
+5 -3
View File
@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 Neo-Desktop
#
@@ -44,10 +43,13 @@ ENV DEBIAN_FRONTEND=noninteractive \
COPY docker/java-proxy.sh /etc/java-proxy.sh
# the CA, if one's given, first: everything after fetches through it
# the CA, if one's given, first: everything after fetches through it (one
# file for each certificate in it: Java's keystore takes a file's first)
RUN --mount=type=secret,id=ca,required=false \
if [ -s /run/secrets/ca ]; then \
mkdir -p /usr/local/share/ca-certificates && cp /run/secrets/ca /usr/local/share/ca-certificates/build-ca.crt; \
mkdir -p /usr/local/share/ca-certificates/build \
&& awk '/BEGIN CERTIFICATE/ { if (f) close(f); f = sprintf("/usr/local/share/ca-certificates/build/ca-%03d.crt", ++n) } \
f { print > f }' /run/secrets/ca; \
fi \
&& apt-get update \
&& apt-get install -y --no-install-recommends \