snappass/Dockerfile
Viktor Haid c13e80bf2a
fix i18n (#375)
* fix i18n

* Ignore linter error regarding _
2024-09-11 10:51:17 -07:00

27 lines
552 B
Docker

FROM python:3.8-slim
ENV APP_DIR=/usr/src/snappass
RUN groupadd -r snappass && \
useradd -r -g snappass snappass && \
mkdir -p $APP_DIR
WORKDIR $APP_DIR
COPY ["setup.py", "requirements.txt", "MANIFEST.in", "README.rst", "AUTHORS.rst", "$APP_DIR/"]
COPY ["./snappass", "$APP_DIR/snappass"]
RUN pip install -r requirements.txt
RUN pybabel compile -d snappass/translations
RUN python setup.py install && \
chown -R snappass $APP_DIR && \
chgrp -R snappass $APP_DIR
USER snappass
# Default Flask port
EXPOSE 5000
CMD ["snappass"]