From e0940fa82e93abe81329e34ad8aafdea2eeca40b Mon Sep 17 00:00:00 2001 From: David Claeys Date: Thu, 26 Feb 2026 10:23:37 +0100 Subject: [PATCH] update build process --- Dockerfile | 8 +++++--- build.sh | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 build.sh diff --git a/Dockerfile b/Dockerfile index 8831ffe..1bc69ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,15 +8,17 @@ ENV START_SCRIPT=$START_SCRIPT_ARG COPY config.json /config/config.json RUN mkdir $(echo "${WORKDIR}") -p COPY start.sh $WORKDIR +COPY build.sh . RUN apk update \ && apk upgrade --available \ && apk add tzdata bash \ - && npm install -g npm@latest \ - && npm install -g plutotv-scraper \ + && chmod +x build.sh \ + && bash build.sh \ && ln -s /config/config.json $(echo "${WORKDIR}/config.json") \ && mkdir /public \ && chmod +x "$START_SCRIPT" \ - && rm -rf /var/cache/apk/* + && rm -rf /var/cache/apk/* \ + && rm build.sh SHELL ["/bin/bash", "-c"] ENTRYPOINT bash $START_SCRIPT work-dir="$WORKDIR" EXPOSE 5050 \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..902f692 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +GIT_REPO_URL="https://github.com/4v3ngR/pluto_tv_scraper.git" +GIT_COMMIT="92f960ec5423efcda9f84edaf7f37d9c2ff86776" +BUILD_FOLDER="/build" +BIN_FOLDER=$"/bin/pluto" + +apk add git +git clone --revision=$GIT_COMMIT $GIT_REPO_URL $BUILD_FOLDER +cd $BUILD_FOLDER +npm install -g npm@latest +npm install +npm install -g . +apk del git +#remove unnecessary files to run the binary to save space +rm -rf .git +rm config.json +rm LICENSE +rm README.md +rm package-lock.json +rm .gitignore \ No newline at end of file