nest-matrix-bot/Dockerfile

28 lines
636 B
Text
Raw Normal View History

2026-07-22 13:33:47 -04:00
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
2026-07-22 16:44:42 -04:00
# Install libolm C library and build dependencies for E2E crypto bindings
RUN apt-get update && apt-get install -y --no-install-recommends \
libolm-dev \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
2026-07-22 13:33:47 -04:00
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY matrix_keycloak_bot.py .
2026-07-22 16:44:42 -04:00
# Create the store directory for Olm/Megolm key databases
2026-07-22 13:33:47 -04:00
RUN useradd -m -u 10001 botuser && \
2026-07-22 16:44:42 -04:00
mkdir -p /app/store && \
2026-07-22 13:33:47 -04:00
chown -R botuser:botuser /app
USER botuser
CMD ["python", "matrix_keycloak_bot.py"]