Add Alpine Linux build system

Add Dockerfiles for building curl-impersonate on Alpine Linux.

The Dockerfile template file was modified to support Alpine Linux,
mainly by changing the dependency installation from 'apt' to 'apk'.
The resulting alpine images are small (~11mb) and will be uploaded to
Docker hub.
This commit is contained in:
lwthiker
2022-03-10 11:57:53 +02:00
parent 91c906febd
commit eaeb619fa7
6 changed files with 345 additions and 18 deletions
+4 -6
View File
@@ -15,14 +15,13 @@ WORKDIR /build
RUN apt-get update && \
apt-get install -y git ninja-build cmake curl zlib1g-dev
# Dependencies for downloading and building BoringSSL
RUN apt-get install -y g++ golang-go unzip
# The following are needed because we are going to change some autoconf scripts,
# both for libnghttp2 and curl.
RUN apt-get install -y autoconf automake autotools-dev pkg-config libtool
# Dependencies for downloading and building BoringSSL
RUN apt-get install -y g++ golang-go unzip
# Download and compile libbrotli
ARG BROTLI_VERSION=1.0.9
RUN curl -L https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz -o brotli-${BROTLI_VERSION}.tar.gz && \
@@ -32,7 +31,6 @@ RUN cd brotli-${BROTLI_VERSION} && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed .. && \
cmake --build . --config Release --target install
# BoringSSL doesn't have versions. Choose a commit that is used in a stable
# Chromium version.
ARG BORING_SSL_COMMIT=3a667d10e94186fd503966f5638e134fe9fb4080
@@ -50,7 +48,7 @@ RUN cd boringssl && \
ninja
# Fix the directory structure so that curl can compile against it.
# See https://everything.curl.dev/source/build/tls/boringssl
# See https://everything.curl.dev/source/build/tls/boringssl
RUN mkdir boringssl/build/lib && \
ln -s ../crypto/libcrypto.a boringssl/build/lib/libcrypto.a && \
ln -s ../ssl/libssl.a boringssl/build/lib/libssl.a && \