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:14:56 +02:00
parent 2e738cd7d0
commit 4ea8f859eb
2 changed files with 11 additions and 8 deletions

View File

@@ -44,15 +44,12 @@ RUN apt-get install -y mercurial python3-pip
RUN apk add mercurial py3-pip clang-analyzer
{{/alpine}}
{{#debian}}
# 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
{{#debian}}
RUN apt-get install -y libnss3
{{/debian}}
{{#alpine}}
RUN apk add nss
{{/alpine}}
{{/firefox}}
{{#chrome}}
# Dependencies for downloading and building BoringSSL
@@ -210,6 +207,12 @@ RUN chmod +x out/curl_*
# When using alpine, create a final, minimal image with the compiled binaries
# only.
FROM alpine:3.15.0
{{#firefox}}
# 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
{{/firefox}}
# Copy curl-impersonate from the builder image
COPY --from=builder /build/out/curl-impersonate /usr/local/bin/