feat: add ca-certificates

This commit is contained in:
nyyu 2025-03-31 08:54:18 +02:00
parent 667709b526
commit f84c93e78f

View file

@ -6,6 +6,7 @@ WORKDIR /build
# Define build arguments
ARG BASE_FILES_VERSION=13.7
ARG CACERTIFICATES_VERSION=20241223
ARG LIBGCC_VERSION=14.2.0-19
ARG GLIBC_VERSION=2.41-6
ARG TZDATA_VERSION=2025b-1
@ -13,6 +14,7 @@ ARG TZDATA_VERSION=2025b-1
# Download required Debian packages
RUN wget -q \
https://ftp.debian.org/debian/pool/main/b/base-files/base-files_${BASE_FILES_VERSION}_amd64.deb \
https://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_${CACERTIFICATES_VERSION}_all.deb \
https://ftp.debian.org/debian/pool/main/g/gcc-14/libgcc-s1_${LIBGCC_VERSION}_amd64.deb \
https://ftp.debian.org/debian/pool/main/g/glibc/libc6_${GLIBC_VERSION}_amd64.deb \
https://ftp.debian.org/debian/pool/main/g/glibc/libc-bin_${GLIBC_VERSION}_amd64.deb \
@ -27,6 +29,8 @@ RUN mkdir -p var/lib/dpkg && \
(cat control; echo) >> var/lib/dpkg/status && \
rm -f $deb control.tar.xz data.tar.xz control; \
done && \
# Generate certificates file and links
find usr/share/ca-certificates -type f -name '*.crt' -exec sh -c 'ln -sf /$1 etc/ssl/certs/$(basename $1) && cat "$1" >> etc/ssl/certs/ca-certificates' sh {} \; && \
# Create a non-root user directory
mkdir -p /home/nonroot && \
chown 65532:65532 /home/nonroot && \