Michal Kobus | 14e835b | 2019-04-11 14:25:27 +0200 | [diff] [blame^] | 1 | # Pin to 3.6, as prometheus-client has a memory leak in 3.7 |
| 2 | # https://github.com/prometheus/client_python/issues/340 |
| 3 | # TODO: unpin when patched prometheus-client version is released |
| 4 | FROM python:3.6-slim |
| 5 | |
| 6 | WORKDIR /usr/src/app |
| 7 | |
| 8 | COPY setup.py /usr/src/app/ |
| 9 | RUN pip install . |
| 10 | |
| 11 | COPY prometheus_es_exporter/*.py /usr/src/app/prometheus_es_exporter/ |
| 12 | RUN pip install -e . |
| 13 | |
| 14 | COPY LICENSE /usr/src/app/ |
| 15 | COPY README.md /usr/src/app/ |
| 16 | |
| 17 | EXPOSE 9206 |
| 18 | |
| 19 | ENTRYPOINT ["python", "-u", "/usr/local/bin/prometheus-es-exporter"] |