diff --git a/.gitignore b/.gitignore index 2e12554..3b06537 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build/ dist/ *.egg-info/ *.pyc +test_data/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0a369c5..40cb482 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,14 @@ FROM python:3.13-slim -# Install FFmpeg and dependencies (gosu will be downloaded separately) +# Install FFmpeg and dependencies required for gosu installation RUN apt-get update && \ - apt-get install -y --no-install-recommends ffmpeg ca-certificates wget gpg && \ + apt-get install -y --no-install-recommends \ + ffmpeg \ + ca-certificates \ + wget \ + gnupg \ + dirmngr \ + gnupg-agent && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -47,5 +53,5 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh # Set the entrypoint ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -# Default command (shows help if no arguments) -CMD ["audio_splitter", "--help"] +# Default command (shows help if no arguments provided) +CMD ["--help"] \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 34edfa6..178ffb6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,9 +9,10 @@ if [ "$(id -u)" = "0" ]; then chown -R appuser:appgroup /data fi - # Drop privileges and run the command using gosu - exec gosu appuser "$@" + # Drop privileges and run audio_splitter with the provided arguments + exec gosu appuser audio_splitter "$@" else - # If not root, just run the command directly - exec "$@" -fi + # If not root, just run audio_splitter directly + # It's not supposed to be called + exec audio_splitter "$@" +fi \ No newline at end of file