diff --git a/.dockerignore b/.dockerignore index f59ec20..e524ad3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,5 @@ -* \ No newline at end of file +* +!src/ +!tests/ +!pyproject.toml +!README.md diff --git a/Dockerfile b/Dockerfile index 0072d9e..7ef8bfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ FROM python:3.13-slim-bullseye -USER root +ENV DEBIAN_FRONTEND=noninteractive ARG INSTALL_GIT=false RUN if [ "$INSTALL_GIT" = "true" ]; then \ - apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*; \ + apt-get update && apt-get install -y --no-install-recommends \ + git \ + && rm -rf /var/lib/apt/lists/*; \ fi # Runtime dependency @@ -12,11 +14,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg \ && rm -rf /var/lib/apt/lists/* -RUN pip install markitdown +WORKDIR /app +COPY . /app +RUN pip --no-cache-dir install . # Default USERID and GROUPID -ARG USERID=10000 -ARG GROUPID=10000 +ARG USERID=nobody +ARG GROUPID=nogroup USER $USERID:$GROUPID