diff --git a/Dockerfile b/Dockerfile index 4b65676..e23ae01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ FROM python:3.8.12-slim-bullseye as builder -ARG with_models=false -ARG models= - WORKDIR /app ARG DEBIAN_FRONTEND=noninteractive @@ -24,11 +21,14 @@ RUN ./venv/bin/pip install . \ FROM python:3.8.12-slim-bullseye +ARG with_models=false +ARG models= + RUN addgroup --system --gid 1032 libretranslate && adduser --system --uid 1032 libretranslate RUN apt-get update -qq && apt-get -qqq install --no-install-recommends -y libicu67 && apt-get clean && rm -rf /var/lib/apt USER libretranslate -COPY --from=builder --chown=libretranslate:libretranslate /app /app +COPY --from=builder --chown=1032:1032 /app /app WORKDIR /app RUN if [ "$with_models" = "true" ]; then \