30 lines
1.3 KiB
Docker
30 lines
1.3 KiB
Docker
FROM debian:latest
|
|
|
|
# Copy CA certificate first
|
|
COPY ./tools/step-ca.crt /usr/local/share/ca-certificates/step-ca.crt
|
|
|
|
# Install ca-certificates and add custom CA using default repos
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends ca-certificates curl && \
|
|
update-ca-certificates
|
|
|
|
# Install keyrings
|
|
RUN curl -fsSL https://scripts.mirror.ygg/data/keyrings/adoptium.gpg -o /etc/apt/keyrings/adoptium.gpg && \
|
|
curl -fsSL https://scripts.mirror.ygg/data/keyrings/docker.asc -o /etc/apt/keyrings/docker.asc && \
|
|
curl -fsSL https://scripts.mirror.ygg/data/keyrings/smallstep.asc -o /etc/apt/keyrings/smallstep.asc && \
|
|
curl -fsSL https://scripts.mirror.ygg/data/keyrings/tailscale-archive-keyring.gpg -o /etc/apt/keyrings/tailscale-archive-keyring.gpg && \
|
|
curl -fsSL https://scripts.mirror.ygg/data/keyrings/libnvidia.gpg -o /etc/apt/keyrings/libnvidia.gpg
|
|
|
|
# Clean everything up
|
|
RUN apt purge ca-certificates curl && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/*
|
|
|
|
# Remove default sources and switch to custom repos (cert is now trusted)
|
|
RUN rm -rf /etc/apt/sources.list.d /etc/apt/sources.list
|
|
COPY ./tools/ygg-sources.list /etc/apt/sources.list
|
|
|
|
# Verify apt works with custom repos
|
|
RUN apt-get update && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* |