fc99a34956
Change-Id: I96549e4a6af70c9f90d3bf3d375f9ed59e636b1e
38 lines
1.2 KiB
Docker
38 lines
1.2 KiB
Docker
FROM ubuntu:trusty
|
|
|
|
MAINTAINER Alexandre Viau <alexandre.viau@savoirfairelinux.com>
|
|
|
|
RUN apt-get update && apt-get install -y vim supervisor python-pip python3-pip python-dev libffi-dev libssl-dev git python-pycurl
|
|
|
|
# Surveil needs shinken (as a lib)
|
|
RUN useradd shinken && pip install https://github.com/naparuba/shinken/archive/2.2-RC1.zip
|
|
|
|
# python-surveilclient (used by surveil-init)
|
|
RUN pip install python-surveilclient
|
|
|
|
# Download packs
|
|
RUN apt-get install -y subversion && \
|
|
svn checkout https://github.com/savoirfairelinux/monitoring-tools/trunk/packs/generic-host /packs/generic-host && \
|
|
svn checkout https://github.com/stackforge/surveil/trunk/shinken-tools/packs/linux-glance /packs/linux-glance && \
|
|
svn checkout https://github.com/stackforge/surveil/trunk/shinken-tools/packs/linux-keystone /packs/linux-keystone && \
|
|
apt-get remove -y subversion
|
|
|
|
ADD requirements.txt surveil/requirements.txt
|
|
ADD setup.py /surveil/setup.py
|
|
ADD setup.cfg /surveil/setup.cfg
|
|
ADD .git /surveil/.git
|
|
|
|
# Install
|
|
RUN pip install -r /surveil/requirements.txt
|
|
|
|
# Supervisor
|
|
ADD tools/docker/surveil_container/etc/supervisor /etc/supervisor
|
|
|
|
# Surveil API
|
|
EXPOSE 8080
|
|
|
|
CMD sleep 20 && \
|
|
cd /surveil/ && \
|
|
python setup.py develop && \
|
|
/usr/bin/supervisord
|