-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update ftl-build container to Alpine v3.21 #100
Changes from all commits
6f70cd5
648dbba
b0a478c
32f6004
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG CONTAINER="alpine:latest" | ||
ARG CONTAINER="alpine:3.21" | ||
FROM ${CONTAINER} AS builder | ||
|
||
ARG TARGETPLATFORM | ||
|
@@ -45,9 +45,12 @@ RUN apk add --no-cache \ | |
ENV STATIC true | ||
ENV TEST true | ||
|
||
# As of Alpine 3.21 (Dec 2024), we need to patch the termcap library to include | ||
# the standard headers as well as unistd.h for the write function | ||
RUN curl -sSL https://ftl.pi-hole.net/libraries/termcap-${termcapversion}.tar.gz | tar -xz \ | ||
&& cd termcap-${termcapversion} \ | ||
&& ./configure --enable-static --disable-shared --disable-doc --without-examples \ | ||
&& sed -i '1i #define STDC_HEADERS 1\n#include <unistd.h>' termcap.c tparam.c \ | ||
&& make -j $(nproc) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Patching is necessary due to a breaking change in GCC 14:
|
||
&& make install \ | ||
&& ls /usr/local/lib/ \ | ||
|
@@ -109,6 +112,14 @@ ARG CI_ARCH="$TARGETPLATFORM" | |
ARG GIT_TAG="test-build" | ||
ARG GIT_BRANCH="special/CI_development" | ||
|
||
# Ensure that the TERM environment variable is set | ||
ENV TERM=${TERM:-xterm} | ||
|
||
# Monkeypatch BATS to remove duplicate output of starting and finished test | ||
# BATS uses ANSI escape codes to overwrite the line after the test has finished | ||
# This is not supported by Github Actions as it does not provide a TTY to the docker build container | ||
RUN sed -i '/buffer_with_truncation /d' /bats-core/libexec/bats-core/bats-format-pretty | ||
|
||
# Test compile FTL's development branch, the result is removed from the final container | ||
# Run the full test suite to ensure that the container is still capable of running the tests | ||
RUN git clone https://github.com/pi-hole/FTL.git --branch "${GIT_BRANCH}" \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻