diff --git a/Dockerfile b/Dockerfile index 5bb5c22..7471eb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,12 @@ +# syntax=docker/dockerfile:1 FROM python:3.13.7-alpine +ARG UID=1000 +ARG GID=1000 + +RUN addgroup -g $GID thirteener +RUN adduser -D -g '' -u $UID -G thirteener thirteener + # Generic labels LABEL maintainer="Arian Mollik Wasi " LABEL version="0.3.4" @@ -18,9 +25,13 @@ LABEL org.opencontainers.image.description="My own custom 12ft.io replacement" LABEL org.opencontainers.image.documentation="https://github.com/wasi-master/13ft/blob/main/README.md" LABEL org.opencontainers.image.licenses=MIT +RUN python -m pip install --upgrade pip + +USER thirteener COPY . . -RUN pip install -r requirements.txt +RUN --mount=type=cache,mode=0755,target=/home/thirteener/.cache/pip \ + pip install -U -r requirements.txt + WORKDIR /app EXPOSE 5000 -ENTRYPOINT [ "gunicorn" ] -CMD [ "portable:app" ] +CMD [ "python", "-m", "gunicorn", "portable:app" ]