forked from sstarcher/docker-sensu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (41 loc) · 1.56 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM debian:jessie
MAINTAINER Shane Starcher <[email protected]>
RUN apt-get update && apt-get install -y wget ca-certificates && apt-get -y clean
RUN wget -q http://repos.sensuapp.org/apt/pubkey.gpg -O- | apt-key add -
RUN echo "deb http://repos.sensuapp.org/apt sensu main" > /etc/apt/sources.list.d/sensu.list
RUN \
apt-get update && \
apt-get install -y sensu && \
apt-get -y clean
ENV PATH /opt/sensu/embedded/bin:$PATH
#Nokogiri is needed by aws plugins
RUN \
apt-get update && \
apt-get install -y libxml2 libxml2-dev libxslt1-dev zlib1g-dev build-essential && \
gem install nokogiri && \
apt-get remove -y libxml2-dev libxslt1-dev zlib1g-dev && \
apt-get autoremove -y && \
apt-get -y clean
RUN wget https://github.com/jwilder/dockerize/releases/download/v0.0.2/dockerize-linux-amd64-v0.0.2.tar.gz
RUN tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.0.2.tar.gz
ENV DEFAULT_PLUGINS_REPO sensu-plugins
ADD templates /etc/sensu/templates
ADD bin /bin/
#Plugins needed for handlers
RUN /bin/install slack mailer pagerduty
#Plugins needed for checks and maybe handlers
RUN /bin/install aws consul docker dns etcd ftp graphite http redis elasticsearch
EXPOSE 4567
VOLUME ["/etc/sensu/conf.d"]
#Client Config
ENV CLIENT_SUBSCRIPTIONS all,default
#Common Config
ENV RUNTIME_INSTALL ''
ENV LOG_LEVEL warn
ENV EMBEDDED_RUBY true
ENV CONFIG_FILE /etc/sensu/config.json
ENV CONFIG_DIR /etc/sensu/conf.d
ENV EXTENSION_DIR /etc/sensu/extensions
ENV PLUGINS_DIR /etc/sensu/plugins
ENV HANDLERS_DIR /etc/sensu/handlers
ENTRYPOINT ["/bin/start"]