Merge pull request #607 from linuxserver/sabnzbd-multiarch-test

This commit is contained in:
Adam
2023-03-22 15:12:08 +00:00
committed by GitHub
4 changed files with 49 additions and 5 deletions
+7 -1
View File
@@ -13,9 +13,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build image
run: |
docker build --no-cache -t ${{ github.sha }} .
docker buildx build --no-cache -t ${{ github.sha }} .
- name: Tag image
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) }}
+31 -4
View File
@@ -1,5 +1,5 @@
## Buildstage ##
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage-x86_64
RUN \
echo "**** install packages ****" && \
@@ -22,8 +22,35 @@ RUN \
make check && \
make install DESTDIR=/root-layer
# copy local files
COPY root/ /root-layer/
## Buildstage ##
FROM --platform=aarch64 ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as buildstage-aarch64
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache --virtual=build-dependencies \
autoconf \
automake \
build-base \
linux-headers && \
echo "**** install par2cmdline-turbo from source ****" && \
mkdir /tmp/par2cmdline && \
curl -o \
/tmp/par2cmdline.tar.gz -L \
"https://github.com/animetosho/par2cmdline-turbo/archive/refs/heads/turbo.tar.gz" && \
tar xf \
/tmp/par2cmdline.tar.gz -C \
/tmp/par2cmdline --strip-components=1 && \
cd /tmp/par2cmdline && \
./automake.sh && \
./configure && \
make && \
make install DESTDIR=/root-layer
FROM scratch as consolidate-builds
COPY --from=buildstage-x86_64 /root-layer/ /par2cmdline-turbo/x86_64
COPY --from=buildstage-aarch64 /root-layer/ /par2cmdline-turbo/aarch64
COPY root/ /
## Single layer deployed image ##
FROM scratch
@@ -31,4 +58,4 @@ FROM scratch
LABEL maintainer="thespad"
# Add files from buildstage
COPY --from=buildstage /root-layer/ /
COPY --from=consolidate-builds / /
+2
View File
@@ -2,6 +2,8 @@
This mod adds the [par2cmdline-turbo](https://github.com/animetosho/par2cmdline-turbo) fork as a replacement for the standard par2cmdline package.
It is supported on both amd64 and aarch64 (arm64) platforms, but not armhf (arm32).
In the SABnzbd docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:sabnzbd-par2cmdline-turbo`
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:sabnzbd-par2cmdline-turbo|linuxserver/mods:openssh-server-mod2`
@@ -8,3 +8,12 @@ echo "*** Removing existing par2cmdline packages ***"
if apk list --installed -q | grep par2cmdline &> /dev/null; then
apk del --purge -q par2cmdline
fi
ARCH=$(uname -m)
if [[ -d "/par2cmdline-turbo/${ARCH}" ]]; then
echo "**** Installing par2cmdline-turbo ****"
cp -a /par2cmdline-turbo/${ARCH}/* /
rm -rf /par2cmdline-turbo
else
echo "**** par2cmdline-turbo already installed or platform unsupported ****"
fi