Install nss in final alpine image

Add 'apk add nss' for the final alpine image of the Firefox version of
curl-impersonate. This is needed for curl to find the list of root
certificates.
This commit is contained in:
lwthiker
2022-03-10 13:17:31 +02:00
parent 2e738cd7d0
commit 4ea8f859eb
2 changed files with 11 additions and 8 deletions
+4 -4
View File
@@ -20,10 +20,6 @@ RUN apk add autoconf automake pkgconfig libtool
# See https://firefox-source-docs.mozilla.org/security/nss/build.html#mozilla-projects-nss-building
RUN apk add mercurial py3-pip clang-analyzer
# curl tries to load the CA certificates for libnss.
# It loads them from /usr/lib/x86_64-linux-gnu/nss/libnssckbi.so,
# which is supplied by libnss3 on Debian/Ubuntu
RUN apk add nss
# Download and compile libbrotli
ARG BROTLI_VERSION=1.0.9
@@ -121,6 +117,10 @@ RUN chmod +x out/curl_*
# When using alpine, create a final, minimal image with the compiled binaries
# only.
FROM alpine:3.15.0
# curl tries to load the CA certificates for libnss.
# It loads them from /usr/lib/libnssckbi.so,
# which is supplied by 'nss' on alpine.
RUN apk add --no-cache nss
# Copy curl-impersonate from the builder image
COPY --from=builder /build/out/curl-impersonate /usr/local/bin/