File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1- ARG CONTAINER="alpine:latest "
1+ ARG CONTAINER="alpine:3.21 "
22FROM ${CONTAINER} AS builder
33
44ARG TARGETPLATFORM
@@ -45,9 +45,12 @@ RUN apk add --no-cache \
4545ENV STATIC true
4646ENV TEST true
4747
48+ # As of Alpine 3.21 (Dec 2024), we need to patch the termcap library to include
49+ # the standard headers as well as unistd.h for the write function
4850RUN curl -sSL https://ftl.pi-hole.net/libraries/termcap-${termcapversion}.tar.gz | tar -xz \
4951 && cd termcap-${termcapversion} \
5052 && ./configure --enable-static --disable-shared --disable-doc --without-examples \
53+ && sed -i '1i #define STDC_HEADERS 1\n #include <unistd.h>' termcap.c tparam.c \
5154 && make -j $(nproc) \
5255 && make install \
5356 && ls /usr/local/lib/ \
@@ -109,6 +112,14 @@ ARG CI_ARCH="$TARGETPLATFORM"
109112ARG GIT_TAG="test-build"
110113ARG GIT_BRANCH="special/CI_development"
111114
115+ # Ensure that the TERM environment variable is set
116+ ENV TERM=${TERM:-xterm}
117+
118+ # Monkeypatch BATS to remove duplicate output of starting and finished test
119+ # BATS uses ANSI escape codes to overwrite the line after the test has finished
120+ # This is not supported by Github Actions as it does not provide a TTY to the docker build container
121+ RUN sed -i '/buffer_with_truncation /d' /bats-core/libexec/bats-core/bats-format-pretty
122+
112123# Test compile FTL's development branch, the result is removed from the final container
113124# Run the full test suite to ensure that the container is still capable of running the tests
114125RUN git clone https://github.com/pi-hole/FTL.git --branch "${GIT_BRANCH}" \
You can’t perform that action at this time.
0 commit comments