Update Docker base images (#168)

Update Docker base images to debian bookworm.
Reduce size of Debian image (remove apt cache) by 10MB
And also minor Markdown lint of INSTALL.md

---------

Co-authored-by: lwthiker <[email protected]>
This commit is contained in:
Alexandre Alapetite
2023-09-16 11:16:41 +03:00
committed by GitHub
co-authored by lwthiker
parent 1e8b50f2ce
commit 172f5185cc
7 changed files with 113 additions and 47 deletions
+12 -5
View File
@@ -1,13 +1,13 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED FROM "Dockerfile.template" VIA
# "generate-dockerfiles.sh".
# `./generate_dockerfiles.sh`
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
# Python is needed for building libnss.
# Use it as a common base.
FROM python:3.10.1-slim-bullseye as builder
FROM python:3.11-slim-bookworm as builder
WORKDIR /build
@@ -19,6 +19,12 @@ RUN apt-get update && \
# both for libnghttp2 and curl.
RUN apt-get install -y autoconf automake autotools-dev pkg-config libtool
# Dependencies for downloading and building nghttp2
RUN apt-get install -y bzip2
# Dependencies for downloading and building curl
RUN apt-get install -y xz-utils
# Dependencies for building libnss
# See https://firefox-source-docs.mozilla.org/security/nss/build.html#mozilla-projects-nss-building
RUN apt-get install -y mercurial python3-pip
@@ -133,12 +139,13 @@ RUN chmod +x out/curl_*
# Create a final, minimal image with the compiled binaries
# only.
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y ca-certificates
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates \
# curl tries to load the CA certificates for libnss.
# It loads them from /usr/lib/libnssckbi.so and /usr/lib/libnsspem.so,
# which are supplied by 'libnss3' and 'nss-plugin-pem' on debian.
RUN apt-get install -y libnss3 nss-plugin-pem
libnss3 nss-plugin-pem \
&& rm -rf /var/lib/apt/lists/*
# Copy curl-impersonate from the builder image
COPY --from=builder /build/install /usr/local
# Update the loader's cache
+6 -4
View File
@@ -1,21 +1,23 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED FROM "Dockerfile.template" VIA
# "generate-dockerfiles.sh".
# `./generate_dockerfiles.sh`
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM alpine:3.15.0 as builder
FROM alpine:3.18 as builder
WORKDIR /build
# Common dependencies
RUN apk add git build-base make cmake ninja curl zlib-dev patch linux-headers python3 python3-dev
RUN apk add git bash build-base make cmake ninja curl zlib-dev patch linux-headers python3 python3-dev
# The following are needed because we are going to change some autoconf scripts,
# both for libnghttp2 and curl.
RUN apk add autoconf automake pkgconfig libtool
# Dependencies for building libnss
# See https://firefox-source-docs.mozilla.org/security/nss/build.html#mozilla-projects-nss-building
RUN apk add mercurial py3-pip clang-analyzer
@@ -128,7 +130,7 @@ RUN chmod +x out/curl_*
# Create a final, minimal image with the compiled binaries
# only.
FROM alpine:3.15.0
FROM alpine:3.18
# curl tries to load the CA certificates for libnss.
# It loads them from /usr/lib/libnssckbi.so,
# which is supplied by 'nss' on alpine.