Files
crochet/Dockerfile
T
pablo 4b0d404116
CI / test (push) Successful in 2m13s
CI / build (push) Successful in 55s
feat: included 2FA and lots of feature from django-htmx-template
2026-09-16 13:20:44 +02:00

30 lines
766 B
Docker

FROM python:3.13-alpine3.23 AS builder
ENV UV_SYSTEM_PYTHON=1
COPY pyproject.toml .
RUN pip install uv && uv pip install -r pyproject.toml && pip uninstall -y uv
FROM python:3.13-alpine3.23
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
WORKDIR /code
# Set user and group
ARG user=apps
ARG uid=1001
ARG gid=1001
RUN addgroup -S ${user} && adduser -S ${user} -G ${user} -u ${uid} -s /bin/sh
RUN apk add --no-cache gettext pango ttf-dejavu
RUN chown -R ${user}:${user} /code
COPY --chown=${user}:${user} . /code
RUN apk add --no-cache --virtual .tailwind-runtime libstdc++ libgcc \
&& su ${user} -c "sh ./scripts/build.sh" \
&& apk del .tailwind-runtime
USER ${user}
CMD ["sh", "./scripts/run.sh"]