| ADD alpine-minirootfs-3.22.1-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| RUN /bin/sh -c apk add --no-cache curl yt-dlp ffmpeg busybox-suid bash python3 mutagen py3-requests py3-dotenv py3-pip # buildkit |
| WORKDIR /app |
| COPY requirements.txt . # buildkit |
| COPY download.sh . # buildkit |
| COPY .src/* . # buildkit |
| RUN /bin/sh -c chmod +x download.sh # buildkit |
| RUN /bin/sh -c chmod +x run-import.sh # buildkit |
| ARG PUID=1000 |
| ARG PGID=1000 |
| RUN |2 PUID=1000 PGID=1000 /bin/sh -c addgroup --gid $PGID appuser # buildkit |
| RUN |2 PUID=1000 PGID=1000 /bin/sh -c adduser -g "" -D -u $PUID -G appuser appuser # buildkit |
| RUN |2 PUID=1000 PGID=1000 /bin/sh -c echo "*/30 * * * * bash /app/run-import.sh" > /etc/crontabs/appuser # buildkit |
| RUN |2 PUID=1000 PGID=1000 /bin/sh -c chown -R appuser:appuser /app # buildkit |
| USER appuser |
| RUN |2 PUID=1000 PGID=1000 /bin/sh -c /app/run-import.sh init # initialize all the python dependencies on container build # buildkit |
| ENTRYPOINT ["/bin/sh" "-c" "crond && exec /app/download.sh"] |