FROM centos:centos6
RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN yum install -y gcc-c++ which wget tar gcc zlib zlib-devel openssl openssl-devel unzip mysql-devel python-devel
RUN mkdir /opt/logs
RUN mkdir /usr/src/nodejs
WORKDIR /usr/src/nodejs
ENV LANG en_US.UTF-8
ENV NODEJS_VERSION 0.11.14
RUN curl -SL "http://dist.u.qiniudn.com/v0.11.14/node-v0.11.14.tar.gz" | tar xvzf - --strip-components=1
RUN ./configure \
&& make \
&& make install \
&& make clean
ADD . /opt/
WORKDIR /opt
RUN tar zxvf scribed.tar.gz \
&& chown -R root:root scribed \
&& rm -f scribed.tar.gz
RUN easy_install supervisor \
&& echo_supervisord_conf > /etc/supervisord.conf \
&& echo "[include]" >> /etc/supervisord.conf \
&& echo "files = /etc/supervisord.d/*.conf" >> /etc/supervisord.conf \
&& mkdir -p /etc/supervisord.d \
&& cp gunicorn.conf scribed.conf /etc/supervisord.d/ \
&& rm -f gunicorn.conf scribed.conf Dockerfile