Skip to content

Commit

Permalink
modver is not assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwen committed Nov 2, 2024
1 parent e302ec7 commit 25db9a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions singbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ RUN apk update && apk upgrade && \
tar \
gzip \
bash \
jq
jq && \
KERNEL_VERSION=$(ls -1 /lib/modules/ | head -n 1) && \
echo "KERNEL_VERSION=${KERNEL_VERSION}" >> /etc/environment

# Define variables for versions
ENV TCP_BRUTAL_REPO="https://github.com/apernet/tcp-brutal"
Expand All @@ -20,16 +22,16 @@ ENV SINGBOX_VERSION="latest"
RUN TCP_BRUTAL_VERSION=$(curl -s https://api.github.com/repos/apernet/tcp-brutal/releases/latest | jq -r .tag_name) && \
TARBALL_URL=$(curl -s https://api.github.com/repos/apernet/tcp-brutal/releases/latest | jq -r .tarball_url) && \
echo "Latest tcp-brutal version: $TCP_BRUTAL_VERSION" && \
echo "TCP_BRUTAL_VERSION_CLEAN=${TCP_BRUTAL_VERSION#v}" >> /etc/environment && \
echo "export TCP_BRUTAL_VERSION_CLEAN=${TCP_BRUTAL_VERSION#v}" >> /etc/profile.d/tcp-brutal.sh && \
TCP_BRUTAL_VERSION_CLEAN=${TCP_BRUTAL_VERSION#v} && \
mkdir -p /usr/src/tcp-brutal && \
curl -L "$TARBALL_URL" | tar xz --strip-components=1 -C /usr/src/tcp-brutal

# Copy and update AKMBUILD file
COPY AKMBUILD /usr/src/tcp-brutal/
RUN cd /usr/src/tcp-brutal && \
sed -i "s/MODVER/$TCP_BRUTAL_VERSION_CLEAN/" AKMBUILD && \
akms install all && \
source /etc/environment && \
KERNELVERSION=$KERNEL_VERSION akms install all && \
echo "Built tcp-brutal module for Sing-box version ${SINGBOX_VERSION}"

# Clean up unnecessary files to reduce image size
Expand Down

0 comments on commit 25db9a7

Please sign in to comment.