forked from m-lab/script-exporter-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (20 loc) · 1.13 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
FROM debian:stretch-slim
# Install necessary packages
RUN apt-get update -qq && apt-get install -qq apt-transport-https curl dnsutils git gnupg golang iproute2 python sudo
# Setup Node.js repository, install nodejs, and any needed modules
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN echo "deb https://deb.nodesource.com/node_0.12 jessie main" > /etc/apt/sources.list.d/nodesource.list
RUN apt-get update -qq && apt-get install -qq nodejs=0.12.18-1nodesource1~jessie1
RUN npm install --global --quiet [email protected] [email protected]
# Clone necessary git repos
RUN git clone https://github.com/m-lab/operator.git /opt/mlab/operator
RUN git clone https://github.com/m-lab/ndt.git /opt/mlab/ndt
# Fetch and build script_exporter
RUN GOPATH=/root/go go get github.com/m-lab/script_exporter
# Copy scripts and configs
COPY apply_tc_rules.sh /bin/apply_tc_rules.sh
COPY ndt_e2e.sh /bin/ndt_e2e.sh
COPY script_exporter.yml /etc/script_exporter/config.yml
# Run apply_tc_rules.sh, then script_exporter.
EXPOSE 9172
ENTRYPOINT /bin/apply_tc_rules.sh && /root/go/bin/script_exporter -config.file=/etc/script_exporter/config.yml