forked from ShiZhan/dashboard-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 1016 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
FROM phusion/baseimage:0.9.19
MAINTAINER Zhan.Shi <[email protected]>
RUN curl -sL https://repos.influxdata.com/influxdb.key | apt-key add - && \
curl -sL https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb https://repos.influxdata.com/ubuntu xenial stable" > /etc/apt/sources.list.d/influxdb.list && \
echo "deb https://packagecloud.io/grafana/stable/debian/ jessie main" > /etc/apt/sources.list.d/grafana.list && \
apt-get update && apt-get -yq install influxdb grafana
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Use /data for all influx disk storage
RUN influxd config > /etc/influxdb.toml
RUN sed -i 's/dir = "\/.*influxdb/dir = "\/influx-data/' /etc/influxdb.toml
# grafana data and config
VOLUME ["/var/lib/grafana", "/var/log/grafana", "/etc/grafana"]
# influxdb data
VOLUME ["/influx-data"]
# grafana http
EXPOSE 3000
# influxdb admin, http, udp, cluster
EXPOSE 8083 8086 8086/udp 8088
ADD run.sh /run.sh
RUN chmod +x /run.sh
CMD ["/run.sh"]