44 lines
909 B
Docker
44 lines
909 B
Docker
FROM python:3.10-slim
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN apt-get update && apt-get install -y locales && \
|
|
sed -i '/de_DE.UTF-8/s/^# //' /etc/locale.gen && \
|
|
locale-gen
|
|
ENV LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8
|
|
|
|
|
|
RUN mkdir -p /app/data && \
|
|
chown -R 1000:1000 /app/data
|
|
|
|
ENV TZ=${TZ}
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
|
|
RUN groupadd -g ${GID} appuser && \
|
|
useradd -l -o -u ${UID} -g appuser -m appuser && \
|
|
mkdir -p /app && \
|
|
chown -R appuser:appuser /app
|
|
|
|
USER appuser
|
|
|
|
EXPOSE 5000 5678
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|