mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 22:03:32 -04:00
Build versioning
This commit is contained in:
@@ -20,7 +20,7 @@ jobs:
|
||||
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
|
||||
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
|
||||
# **** 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
|
||||
outputs:
|
||||
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}
|
||||
|
||||
+18
-2
@@ -1,8 +1,24 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
|
||||
|
||||
ARG MOD_VERSION=master
|
||||
|
||||
RUN \
|
||||
echo "**** grab rffmpeg ****" && \
|
||||
mkdir -p /root-layer/usr/local/bin/ && \
|
||||
curl -o \
|
||||
/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
|
||||
|
||||
LABEL maintainer="junkman690"
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
# Add files from buildstage
|
||||
COPY --from=buildstage /root-layer/ /
|
||||
|
||||
@@ -41,7 +41,6 @@ services:
|
||||
- RFFMPEG_WOL=api
|
||||
- RFFMPEG_HOST=transcode
|
||||
- RFFMPEG_HOST_MAC="12:ab:34:cd:ef:56"
|
||||
- RFFMPEG_COMMIT_SHA=master # (optional) which commit of rffmpeg to download
|
||||
- WOL_API=192.168.1.5 #docker host IP
|
||||
- WOL_API_PORT=8431
|
||||
- WOL_WAIT=10 #time transcode host takes to start
|
||||
|
||||
@@ -13,17 +13,6 @@ else
|
||||
cp /defaults/rffmpeg.yml.sample /config/rffmpeg/rffmpeg.yml
|
||||
fi
|
||||
|
||||
#Grab rffmpeg
|
||||
mkdir -p /usr/local/bin/
|
||||
echo "**** Grabbing rffmpeg from upstream ****"
|
||||
rm -rf /usr/local/bin/rffmpeg
|
||||
if [ ! -z "$RFFMPEG_COMMIT_SHA" ]; then
|
||||
curl -L -o /usr/local/bin/rffmpeg https://raw.githubusercontent.com/joshuaboniface/rffmpeg/$RFFMPEG_COMMIT_SHA/rffmpeg
|
||||
else
|
||||
curl -L -o /usr/local/bin/rffmpeg https://raw.githubusercontent.com/joshuaboniface/rffmpeg/master/rffmpeg
|
||||
fi
|
||||
chmod +x /usr/local/bin/rffmpeg
|
||||
|
||||
##Update 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
|
||||
|
||||
Reference in New Issue
Block a user