Created
November 10, 2014 14:54
-
-
Save sunaemon/768b5a528c932041f496 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:wheezy | |
MAINTAINER sunaemon <@sunaemon0> | |
# install packages | |
RUN echo 'Acquire::http { Proxy "http://hogehoge:3142"; }; ' > /etc/apt/apt.conf.d/50-apt-cacker.conf | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && apt-get upgrade -y | |
#install tools for logging and process administration | |
RUN apt-get install -y monit rsyslog | |
WORKDIR / | |
RUN apt-get install -y ruby ruby-dev build-essential wget | |
#RUN gem sources -a http://hogehoge:2000/ -r http://rubygems.org/ | |
RUN gem sources | |
RUN apt-get install -y time | |
RUN time gem install fluentd --no-ri --no-rdoc | |
ENV PATH /.gem/ruby/2.1.0/bin:$PATH | |
RUN mkdir -p /var/log/fluent | |
RUN mkdir -p /var/run/fluent | |
# install fluent-plugins | |
RUN apt-get install -y libmysqlclient-dev libpq-dev | |
RUN gem install fluent-plugin-sql fluent-plugin-tail-multiline --no-ri --no-rdoc | |
#zabbix-agent | |
WORKDIR /tmp | |
RUN wget http://repo.zabbix.com/zabbix/2.2/debian/pool/main/z/zabbix-release/zabbix-release_2.2-1+wheezy_all.deb | |
RUN dpkg -i zabbix-release_2.2-1+wheezy_all.deb | |
RUN apt-get update | |
RUN apt-get install -y zabbix-agent | |
# log setting | |
ADD fluentd.conf /etc/fluent/fluentd.conf | |
# setting files for monit | |
ADD monit/monitrc /etc/monit/monitrc | |
ADD monit/fluent.conf /etc/monit/conf.d/fluent.conf | |
ADD monit/rsyslog.conf /etc/monit/conf.d/rsyslog.conf | |
ADD monit/zabbix-agent.conf /etc/monit/conf.d/zabbix-agent.conf | |
# for monit | |
EXPOSE 2812 | |
# for monit | |
EXPOSE 10050 | |
CMD ["/usr/bin/monit", "-I", "-c", "/etc/monit/monitrc"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment