Доработка entrypoint для чекера: загрузка готового бинаря вместо компиляции

This commit is contained in:
2025-05-13 15:52:37 +08:00
parent 907aea1f9e
commit 55bc7ce0f8
2 changed files with 13 additions and 6 deletions

View File

@@ -3,18 +3,24 @@
echo "CHECKER_WAIT=$CHECKER_WAIT"
echo "CHECKER_INIFILE=$CHECKER_INIFILE"
echo "CHECKER_TAGFILE=$CHECKER_TAGFILE"
binary="$PWD/bin/iptvc"
binary="/app/bin/linux_amd64/iptvc"
args="check -i $CHECKER_INIFILE -t $CHECKER_TAGFILE"
go get
make linux
if [ ! -f "$binary" ]; then
echo "Downloading latest iptvc..."
wget https://git.axenov.dev/IPTV/iptvc/releases/download/latest/linux_amd64.zip
[ ! -d "$PWD/bin" ] && mkdir "$PWD/bin"
unzip -o linux_amd64.zip -d "$PWD/bin"
rm -rf linux_amd64.zip
fi
if [ ! -f "$binary" ]; then
echo "Not found: $binary"
exit 1
fi
$binary version
args="check -i $CHECKER_INIFILE -t $CHECKER_TAGFILE"
while true; do
echo
echo "Running: $binary $args"

View File

@@ -4,7 +4,8 @@ RUN apk --no-cache add \
bash \
tzdata \
go \
make
make \
libc6-compat
RUN mkdir /app && \
chmod 777 /app