Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build msquic in a separate docker stage #1064

Merged
merged 6 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 35 additions & 41 deletions src/alpine/3.16/helix/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
FROM alpine:3.16 as msquic

# build MsQuic as we don't have packages
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl

RUN git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic /tmp/msquic

WORKDIR /tmp/msquic

RUN cmake -B build/linux/x64_Release_openssl \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/x64_Release_openssl --config Release && \
cmake --install build/linux/x64_Release_openssl --prefix /msquic

FROM alpine:3.16

RUN apk update && \
Expand Down Expand Up @@ -54,47 +87,8 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \
pip install ./helix_scripts-*-py3-none-any.whl

# build MsQuic as we don't have packages
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl && \
cd /tmp && \
git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic && \
cd msquic && \
cmake -B build/linux/x64_openssl \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/x64_openssl --config Release && \
cp artifacts/bin/linux/x64_Release_openssl/libmsquic.so.* artifacts/bin/linux/x64_Release_openssl/libmsquic.lttng.so.* /usr/lib && \
ldd artifacts/bin/linux/x64_Release_openssl/libmsquic.so.* && \
rm -rf /tmp/msquic && \
apk del \
cmake \
g++ \
gcc \
git \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl
# Copy msquic from the msquic image into our image that will run on Helix
COPY --from=msquic /msquic /

# Needed for corefx tests to pass
ENV LANG=en-US.UTF-8
Expand Down
78 changes: 36 additions & 42 deletions src/alpine/3.16/helix/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
FROM arm64v8/alpine:3.16 as msquic

# build MsQuic as we don't have packages
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl

RUN git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic /tmp/msquic

WORKDIR /tmp/msquic

RUN cmake -B build/linux/arm64_Release_openssl \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm64_Release_openssl \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TARGET_ARCHITECTURE=arm64 \
-DQUIC_TLS=openssl \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/arm64_Release_openssl --config Release && \
cmake --install build/linux/arm64_Release_openssl --prefix /msquic

FROM arm64v8/alpine:3.16
# Install .NET and test dependencies
RUN apk update && apk add --no-cache \
Expand Down Expand Up @@ -38,48 +72,8 @@ RUN apk update && apk add --no-cache && \
python3-dev \
openssl-dev

# build MsQuic as we don't have Alpine packages (yet)
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl && \
cd /tmp && \
git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic && \
cd msquic && \
cmake -B build/linux/arm64_openssl \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm64_Release_openssl \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TARGET_ARCHITECTURE=arm64 \
-DQUIC_TLS=openssl \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/arm64_openssl --config Release && \
cp artifacts/bin/linux/arm64_Release_openssl/libmsquic.so.* artifacts/bin/linux/arm64_Release_openssl/libmsquic.lttng.so.* /usr/lib && \
ldd artifacts/bin/linux/arm64_Release_openssl/libmsquic.so.* && \
rm -rf /tmp/msquic && \
apk del \
cmake \
g++ \
gcc \
git \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl
# Copy msquic from the msquic image into our image that will run on Helix
COPY --from=msquic /msquic /

# Needed for runtime tests to pass
ENV LANG=en-US.UTF-8
Expand Down
75 changes: 35 additions & 40 deletions src/alpine/3.17/helix/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
FROM alpine:3.17 as msquic

# build MsQuic as we don't have packages
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl

RUN git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic /tmp/msquic

WORKDIR /tmp/msquic

RUN cmake -B build/linux/x64_Release_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/x64_Release_openssl3 --config Release && \
cmake --install build/linux/x64_Release_openssl3 --prefix /msquic

FROM alpine:3.17
# Install .NET and test dependencies
RUN apk update && apk add --no-cache \
Expand Down Expand Up @@ -39,46 +72,8 @@ RUN apk update && apk add --no-cache && \
python3-dev \
openssl-dev

# build MsQuic as we don't have Alpine packages (yet)
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl && \
cd /tmp && \
git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic && \
cd msquic && \
cmake -B build/linux/x64_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/x64_openssl3 --config Release && \
cp artifacts/bin/linux/x64_Release_openssl3/libmsquic.so.* artifacts/bin/linux/x64_Release_openssl3/libmsquic.lttng.so.* /usr/lib && \
rm -rf /tmp/msquic && \
apk del \
cmake \
g++ \
gcc \
git \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl
# Copy msquic from the msquic image into our image that will run on Helix
COPY --from=msquic /msquic /

# Needed for runtime tests to pass
ENV LANG=en-US.UTF-8
Expand Down
77 changes: 36 additions & 41 deletions src/alpine/3.17/helix/arm32v7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
FROM arm32v7/alpine:3.17 as msquic

# build MsQuic as we don't have packages
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl

RUN git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic /tmp/msquic

WORKDIR /tmp/msquic

RUN cmake -B build/linux/arm_Release_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TARGET_ARCHITECTURE=arm \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/arm_Release_openssl3 --config Release && \
cmake --install build/linux/arm_Release_openssl3 --prefix /msquic

FROM arm32v7/alpine:3.17
# Install .NET and test dependencies
RUN apk update && apk add --no-cache \
Expand Down Expand Up @@ -39,47 +73,8 @@ RUN apk update && apk add --no-cache && \
python3-dev \
openssl-dev

# build MsQuic as we don't have Alpine packages (yet)
RUN apk update && apk add --no-cache && \
apk add \
cmake \
g++ \
gcc \
git \
numactl-dev \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl && \
cd /tmp && \
git clone --depth 1 --single-branch --branch v2.3.5 --recursive https://github.com/microsoft/msquic && \
cd msquic && \
cmake -B build/linux/arm_openssl3 \
-DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm_Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TARGET_ARCHITECTURE=arm \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/arm_openssl3 --config Release && \
cp artifacts/bin/linux/arm_Release_openssl3/libmsquic.so.* artifacts/bin/linux/arm_Release_openssl3/libmsquic.lttng.so.* /usr/lib && \
rm -rf /tmp/msquic && \
apk del \
cmake \
g++ \
gcc \
git \
linux-headers \
lttng-ust-dev \
make \
musl-dev \
openssl-dev \
perl
# Copy msquic from the msquic image into our image that will run on Helix
COPY --from=msquic /msquic /

# Needed for runtime tests to pass
ENV LANG=en-US.UTF-8
Expand Down
Loading