docker/templates/sphinxsearch/Dockerfile

42 lines
1.2 KiB
Docker
Raw Normal View History

FROM ubuntu:14.04
ENV TERM xterm
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y install software-properties-common && add-apt-repository ppa:builds/sphinxsearch-rel22 && \
apt-get update && apt-get -y upgrade && \
apt-get -y install nano supervisor mariadb-client libstemmer0d sphinxsearch logrotate && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD logrotate-sphinxsearch /etc/logrotate.d/sphinxsearch
ADD cron-sphinxsearch /etc/cron.d/sphinxsearch
# Add cli to run
ADD run.sh /home/run.sh
RUN chmod 775 /home/*.sh
ADD sdsphinx.tar.gz /home/
RUN cp /home/sdsphinx/config/sphinx.conf /etc/sphinxsearch/sphinx.conf && \
mkdir -p /var/lib/sphinxsearch/log && mkdir -p /var/lib/sphinxsearch/idx && \
chmod 775 /home/sdsphinx/indexer/*.sh
# Add VOLUMEs
VOLUME ["/etc/cron.d", "/etc/sphinxsearch", "/var/lib/sphinxsearch"]
# Environnement variables
ENV MYSQL_HOST=192.168.3.30 \
MYSQL_USER=sphinx \
MYSQL_PASS=indexer \
SLAVE=0 \
INDEX_ACT=0 \
INDEX_CIBLAGE=0 \
INDEX_DIR=0 \
INDEX_ENT=0 \
INDEX_DIR=0 \
INDEX_HISTO=0
EXPOSE 9306 9312
CMD ["/usr/bin/supervisord"]