forked from nviallatte/nexus-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (28 loc) · 1.03 KB
/
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
33
34
FROM alpine:3.9
# Adds testing package to repositories
# Install needed packages. Notes:
# * build-base: used so we include the basic development packages (gcc)
# * python-dev: are used for gevent e.g.
# * bash: so we can access /bin/bash
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
musl \
build-base \
bash \
git \
python \
python-dev \
py-pip \
&& pip install --upgrade pip \
&& rm /var/cache/apk/*
# make some useful symlinks that are expected to exist
RUN cd /usr/bin \
&& ln -sf easy_install-2.7 easy_install \
&& ln -sf python2.7 python \
&& ln -sf python2.7-config python-config \
&& ln -sf pip2.7 pip
COPY app /opt/prometheus-nexus-exporter
RUN pip install -r /opt/prometheus-nexus-exporter/requirements.txt \
&& chmod +x /opt/prometheus-nexus-exporter/exporter.py
EXPOSE 9158
ENTRYPOINT ["python", "/opt/prometheus-nexus-exporter/exporter.py"]