Skip to content

Commit

Permalink
Adds Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
François SCALA authored and ThoreKr committed Nov 29, 2019
1 parent 039d612 commit 7d5d6ff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git/
.dockerignore
Dockerfile
*.md
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3-alpine

ENV CUPS_HOST "127.0.0.1"
ENV CUPS_PORT "631"
ENV CUPS_USER "default"
ENV LISTEN_PORT "9329"

ADD . /opt/cups-exporter

WORKDIR /opt/cups-exporter

EXPOSE 9329

RUN set -xe;\
apk add gcc libc-dev cups-dev;\
pip install prometheus-client~=0.7.1 pycups~=1.9.74

CMD [ "sh", "-c", "./cups_exporter.py --cups-host ${CUPS_HOST} --cups-port ${CUPS_PORT} --cups-user ${CUPS_USER} --listen-port ${LISTEN_PORT}" ]

0 comments on commit 7d5d6ff

Please sign in to comment.