mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-10 01:43:49 -04:00
Merge pull request #760 from Dominaezzz/patch-1
Allow user to specify which version of rffmpeg to download
This commit is contained in:
@@ -20,7 +20,7 @@ jobs:
|
|||||||
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
|
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
|
||||||
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
|
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
|
||||||
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
|
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
|
||||||
MOD_VERSION=""
|
MOD_VERSION=$(curl -s https://api.github.com/repos/joshuaboniface/rffmpeg/commits/master | jq -rc ".sha")
|
||||||
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
|
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}
|
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}
|
||||||
|
|||||||
+19
-2
@@ -1,8 +1,25 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
|
||||||
|
|
||||||
|
ARG MOD_VERSION
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
echo "**** grab rffmpeg ****" && \
|
||||||
|
mkdir -p /root-layer/usr/local/bin/ && \
|
||||||
|
MOD_VERSION=${MOD_VERSION:-master} && \
|
||||||
|
curl -fo \
|
||||||
|
/root-layer/usr/local/bin/rffmpeg -L \
|
||||||
|
"https://raw.githubusercontent.com/joshuaboniface/rffmpeg/${MOD_VERSION}/rffmpeg" && \
|
||||||
|
chmod +x /root-layer/usr/local/bin/rffmpeg
|
||||||
|
|
||||||
|
# copy local files
|
||||||
|
COPY root/ /root-layer/
|
||||||
|
|
||||||
|
## Single layer deployed image ##
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
LABEL maintainer="junkman690"
|
LABEL maintainer="junkman690"
|
||||||
|
|
||||||
# copy local files
|
# Add files from buildstage
|
||||||
COPY root/ /
|
COPY --from=buildstage /root-layer/ /
|
||||||
|
|||||||
@@ -13,13 +13,6 @@ else
|
|||||||
cp /defaults/rffmpeg.yml.sample /config/rffmpeg/rffmpeg.yml
|
cp /defaults/rffmpeg.yml.sample /config/rffmpeg/rffmpeg.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Grab rffmpeg
|
|
||||||
mkdir -p /usr/local/bin/
|
|
||||||
echo "**** Grabbing rffmpeg from upstream ****"
|
|
||||||
rm -rf /usr/local/bin/rffmpeg
|
|
||||||
curl -L -o /usr/local/bin/rffmpeg https://raw.githubusercontent.com/joshuaboniface/rffmpeg/master/rffmpeg
|
|
||||||
chmod +x /usr/local/bin/rffmpeg
|
|
||||||
|
|
||||||
##Update rffmpeg.yml
|
##Update rffmpeg.yml
|
||||||
sed -i 's~#persist: "/run/shm"~persist: "/dev/shm"~' /config/rffmpeg/rffmpeg.yml
|
sed -i 's~#persist: "/run/shm"~persist: "/dev/shm"~' /config/rffmpeg/rffmpeg.yml
|
||||||
sed -i 's~#state: "/var/lib/rffmpeg"~state: "/config/rffmpeg"~' /config/rffmpeg/rffmpeg.yml
|
sed -i 's~#state: "/var/lib/rffmpeg"~state: "/config/rffmpeg"~' /config/rffmpeg/rffmpeg.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user