mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-05 05:13:59 +03:00
Refactor Dockerfile and entrypoint script for improved configuration handling and streamline image setup
This commit is contained in:
+17
-4
@@ -2,9 +2,22 @@ FROM python:3.12-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy application code (package) and bootstrap
|
||||
COPY yt-playlist-main.py /app/
|
||||
COPY ./bin/ffmpeg /app/bin
|
||||
COPY ./bin/yt-dlp /app/bin
|
||||
COPY ./bin/aria2c /app/bin
|
||||
COPY ytplaylist/ /app/ytplaylist/
|
||||
COPY config/ /app/config/
|
||||
|
||||
CMD ["python","-m","ytplaylist.cli"]
|
||||
# Copy helper binaries into a bin/ folder inside the image
|
||||
COPY ./bin/ffmpeg /app/bin/ffmpeg
|
||||
COPY ./bin/yt-dlp /app/bin/yt-dlp
|
||||
COPY ./bin/aria2c /app/bin/aria2c
|
||||
|
||||
# Copy entrypoint that maps environment variables to CLI flags
|
||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||
RUN chmod +x /app/docker-entrypoint.sh && chmod +x /app/bin/* || true
|
||||
|
||||
# Put the bundled bin directory first in PATH
|
||||
ENV PATH="/app/bin:${PATH}"
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
CMD [""]
|
||||
|
||||
Reference in New Issue
Block a user