-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
90 lines (71 loc) · 3.58 KB
/
Copy pathDockerfile
File metadata and controls
90 lines (71 loc) · 3.58 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
# Install required packages
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip libcairo2-dev curl git nginx-light supervisor
# Install Python related modules
RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel
RUN python3.6 -m pip install redis
RUN pip install --upgrade setuptools
RUN pip install gunicorn
#Install nodejs for kube-watch
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
# Install redis-server and redis-cli
RUN add-apt-repository -y ppa:chris-lea/redis-server
RUN apt-get update
RUN apt-get install -y redis-server redis-tools
RUN pip install Twisted>=13.2.0
#RUN pip install Twisted==18.7.0
RUN pip install pytz
RUN git clone https://github.com/graphite-project/whisper.git /src/whisper &&\
cd /src/whisper &&\
git checkout 1.1.5 &&\
python3.6 setup.py install
RUN git clone https://github.com/graphite-project/carbon.git /src/carbon &&\
cd /src/carbon &&\
git checkout 1.1.5 &&\
python3.6 setup.py install
RUN git clone https://github.com/graphite-project/graphite-web.git /src/graphite-web &&\
cd /src/graphite-web &&\
git checkout 1.1.5 &&\
python3.6 setup.py install &&\
pip install -r requirements.txt &&\
python3.6 check-dependencies.py
# fixes fatal error "Your WhiteNoise configuration is incompatible with WhiteNoise v4.0"
RUN /usr/bin/yes | pip uninstall whitenoise &&\
pip install "whitenoise<4"
# Add system service config
ADD ./nginx/nginx.conf /etc/nginx/nginx.conf
ADD ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Add graphite config
ADD ./webapp/initial_data.json /opt/graphite/webapp/graphite/initial_data.json
#ADD ./webapp/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
ADD ./webapp/local_settings.py.template /opt/graphite/webapp/graphite/local_settings.py.template
ADD ./conf/carbon.conf /opt/graphite/conf/carbon.conf
ADD ./conf/storage-schemas.conf /opt/graphite/conf/storage-schemas.conf
ADD ./conf/storage-aggregation.conf /opt/graphite/conf/storage-aggregation.conf
RUN mkdir -p /opt/graphite/storage/whisper
RUN touch /opt/graphite/storage/graphite.db /opt/graphite/storage/index
RUN chmod 0775 /opt/graphite/storage /opt/graphite/storage/whisper
RUN chmod 0664 /opt/graphite/storage/graphite.db
RUN cp /src/graphite-web/webapp/manage.py /opt/graphite/webapp
ADD ./redis/redis.conf /etc/redis/redis.conf
RUN mkdir /kube-watch
RUN cd /kube-watch && npm install hashring kubernetes-client@5 json-stream
ADD kube-watch.js /kube-watch/kube-watch.js
# Install curator cron job
ADD curator/cron /etc/cron.d/curator.cron
ADD curator/run.sh /etc/cron.d/curator.sh
RUN chmod +x /etc/cron.d/curator.sh
ADD entrypoint.sh /entrypoint.sh
# Nginx
EXPOSE 80
# Carbon pickle receiver port
EXPOSE 2004
RUN chmod +x entrypoint.sh
CMD ["/entrypoint.sh"]