forked from pryorda/vmware_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (21 loc) · 799 Bytes
/
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
FROM python:2.7-alpine as linter
# Runs required lints so automated builds are a little more fluid
WORKDIR /opt/vmware_exporter/
COPY . /opt/vmware_exporter/
RUN pip install flake8 && \
apk add --no-cache --update nodejs npm && \
npm install -g dockerfilelint
RUN flake8 vmware_exporter
RUN dockerfilelint Dockerfile
FROM python:2.7-alpine
LABEL MAINTAINER="Daniel Pryor <[email protected]>"
LABEL NAME=vmware_exporter
LABEL VERSION=0.2.5
WORKDIR /opt/vmware_exporter/
COPY . /opt/vmware_exporter/
RUN set -x; buildDeps="gcc python-dev musl-dev libffi-dev openssl openssl-dev" \
&& apk add --no-cache --update $buildDeps \
&& pip install -r requirements.txt \
&& apk del $buildDeps
EXPOSE 9272
ENTRYPOINT ["python", "-u", "/opt/vmware_exporter/vmware_exporter/vmware_exporter.py"]