Skip to content

Commit

Permalink
Dockerfile.alpine as improved Dockerfile
Browse files Browse the repository at this point in the history
- Only 25% of the size of the original one
- Uses official Python base image
- Python 3.12 (compromise between stability and new features)
- Alpine 3.20 (also stability / feature compromise)
- All buildtools are removed after building
  • Loading branch information
uagaro committed Jan 8, 2025
1 parent 362b419 commit a337aeb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.12-alpine3.20
ARG NEEDED_PACKAGES_FOR_BUILD="olm-dev jpeg-dev cmake make gcc g++"

RUN mkdir -p /app/matrix_commander/

WORKDIR /app/
COPY requirements.txt .
RUN apk add --no-cache ${NEEDED_PACKAGES_FOR_BUILD} && \
pip3 install --no-cache -r requirements.txt && \
apk del --purge ${NEEDED_PACKAGES_FOR_BUILD}
RUN apk add --no-cache libjpeg olm libmagic

WORKDIR /app/matrix_commander/
COPY matrix_commander/matrix_commander.py .
COPY matrix_commander/matrix-commander .
COPY matrix_commander/__init__.py .

VOLUME /data

ENTRYPOINT ["python3", "/app/matrix_commander/matrix-commander" ,"-s", "/data/store", "-c", "/data/credentials.json"]

0 comments on commit a337aeb

Please sign in to comment.