-
Notifications
You must be signed in to change notification settings - Fork 39
/
Dockerfile
32 lines (19 loc) · 840 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG ARCH=
FROM ${ARCH}python:3.12-slim-bookworm as builder
WORKDIR /enviroplus
RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
python3 \
python3-pip
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
build-essential libssl-dev libffi-dev python3-dev cmake
COPY requirements.txt .
RUN pip3 install -r requirements.txt
FROM ${ARCH}python:3.12.2-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
CMD [ "--bind=0.0.0.0", "--port=8000" ]
ENTRYPOINT [ "python3", "enviroplus_exporter.py" ]