Repository navigation
Expand file tree
/
Copy pathDockerfile.release
More file actions
49 lines (43 loc) · 2.1 KB
/
Copy pathDockerfile.release
File metadata and controls
49 lines (43 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# scratch has no CA bundle and no /tmp. Go reads the system roots from
# /etc/ssl/certs/ca-certificates.crt for HTTPS to SILO and OIDC providers, and
# spills large multipart uploads to /tmp. The bundle is architecture-neutral,
# so it is built once on the builder platform, with the same blocklist as the
# pgsty/silo and pgsty/mc images.
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/ubi:latest@sha256:8b212f75a0e5a156ac28b1c5c030d2e8a07715254e19d522286118279399af81 AS certs
# Native root blocklist mitigation: https://access.redhat.com/security/vulnerabilities/RHSB-2026-012
RUN dnf -y install ca-certificates && \
if [ -d /etc/pki/ca-trust/source/blocklist ]; then \
blocklist=/etc/pki/ca-trust/source/blocklist; \
else \
blocklist=/etc/pki/ca-trust/source/blacklist; \
fi && \
trust extract --overwrite --format=pem-bundle \
--filter='pkcs11:object=Comodo%20AAA%20Services%20root;type=cert' \
"$blocklist/Comodo_AAA_Services_root.pem" && \
trust extract --overwrite --format=pem-bundle \
--filter='pkcs11:object=emSign%20ECC%20Root%20CA%20-%20G3;type=cert' \
"$blocklist/emSign_ECC_Root_CA_-_G3.pem" && \
update-ca-trust && \
mkdir -p /rootfs/etc/ssl/certs /rootfs/tmp && \
chmod 1777 /rootfs/tmp && \
cp /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /rootfs/etc/ssl/certs/ca-certificates.crt
FROM scratch
ARG TAG
ARG SOURCE
LABEL name="SILO Console" \
maintainer="Pigsty" \
version="${TAG}" \
release="${TAG}" \
summary="The SILO object storage console" \
description="See Github for more information https://github.com/pgsty/silo-console" \
org.opencontainers.image.source="https://github.com/pgsty/silo-console" \
org.opencontainers.image.description="The SILO object storage console" \
org.opencontainers.image.licenses="AGPL-3.0-or-later"
# Copy the parent so tmp/ arrives as a directory entry and keeps mode 1777.
COPY --from=certs /rootfs/ /
COPY console /console
COPY LICENSE NOTICE CREDITS /usr/share/licenses/silo-console/
EXPOSE 9090
USER 1000:1000
ENTRYPOINT ["/console"]
CMD [ "server"]