Skip to content

Commit

Permalink
Update base Docker image and reduce image size. Resolves #17 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang authored Jul 27, 2022
1 parent a94355d commit c003fba
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
FROM alpine:3.12
FROM python:3.10-alpine3.16

WORKDIR /usr/src

RUN apk update; \
apk add --no-cache python3 py3-pip smartmontools; \
python3 -m pip install prometheus_client;
RUN apk add --no-cache smartmontools \
&& pip install prometheus_client \
# remove temporary files
&& rm -rf /root/.cache/ \
&& find / -name '*.pyc' -delete

ADD smartprom.py .
COPY ./smartprom.py /smartprom.py

EXPOSE 9902
ENTRYPOINT "./smartprom.py"
ENTRYPOINT ["/usr/local/bin/python", "/smartprom.py"]

# HELP
# docker build -t matusnovak/prometheus-smartctl:test .

0 comments on commit c003fba

Please sign in to comment.