Skip to content

Commit

Permalink
Changed to python slim image
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrink committed Nov 22, 2023
1 parent a7c4662 commit 8af8fcc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ARG ARCH=
FROM ${ARCH}ubuntu:20.04
FROM ${ARCH}python:3.12.0-slim-bookworm as builder

WORKDIR /enviroplus

RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime

Expand All @@ -14,6 +16,15 @@ COPY requirements.txt .

RUN pip3 install -r requirements.txt

FROM ${ARCH}python:3.12.0-slim-bookworm

WORKDIR /enviroplus

# Make sure you update Python version in path
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages

COPY enviroplus_exporter.py .

CMD python3 enviroplus_exporter.py --bind=0.0.0.0 --port=8000

# ENTRYPOINT [ "python3", "enviroplus_exporter.py", "--bind=0.0.0.0", "--port=8000" ]

0 comments on commit 8af8fcc

Please sign in to comment.