-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
1 changed file
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |