Skip to content

Commit

Permalink
Merge pull request #14 from mpepping/smaller-docker-image
Browse files Browse the repository at this point in the history
Switched FROM to slim-debian-bullseye
  • Loading branch information
mpepping authored Jan 23, 2022
2 parents 9d9dfb5 + a820b38 commit 1de9753
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM registry.access.redhat.com/ubi8/python-38:1-68
FROM python:3.10-slim-bullseye

LABEL maintainer "Martijn Pepping <[email protected]>"
LABEL org.opencontainers.image.source https://github.com/mpepping/solarman-mqtt

ADD . /opt/app-root/src/
ADD . /opt/app/src/
WORKDIR /opt/app/src

RUN pip install -U "pip>=19.3.1" && \
RUN python3 -m venv /opt/venv && \
. /opt/venv/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt

WORKDIR /opt/app-root/src
ENV PATH=/opt/venv/bin:$PATH

ENTRYPOINT ["python", "run.py"]
CMD ["-d"]

0 comments on commit 1de9753

Please sign in to comment.