Commit 8d71679a by Édouard Lopez

leverage docker caching mechanism and improve readability

parent 6f63d862
......@@ -4,34 +4,25 @@ FROM debian:wheezy-backports
ENV restyaboard_version=v0.2
# update & install package
RUN \
apt-get update -y &&\
apt-get install -y zip curl cron postgresql nginx &&\
apt-get install -y php5 php5-fpm php5-curl php5-pgsql php5-imagick libapache2-mod-php5 &&\
echo "postfix postfix/mailname string example.com"\
| debconf-set-selections &&\
echo "postfix postfix/main_mailer_type string 'Internet Site'"\
| debconf-set-selections &&\
apt-get install -y postfix
RUN apt-get update --yes
RUN apt-get install --yes zip curl cron postgresql nginx
RUN apt-get install --yes php5 php5-fpm php5-curl php5-pgsql php5-imagick libapache2-mod-php5
RUN echo "postfix postfix/mailname string example.com" | debconf-set-selections \
&& echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections \
&& apt-get install -y postfix
# deploy app
RUN \
curl -L -o /tmp/restyaboard.zip \
https://github.com/RestyaPlatform/board/releases/download/${restyaboard_version}/board-${restyaboard_version}.zip &&\
unzip /tmp/restyaboard.zip -d /usr/share/nginx/html &&\
rm /tmp/restyaboard.zip
RUN curl -L -o /tmp/restyaboard.zip https://github.com/RestyaPlatform/board/releases/download/${restyaboard_version}/board-${restyaboard_version}.zip \
&& unzip /tmp/restyaboard.zip -d /usr/share/nginx/html \
&& rm /tmp/restyaboard.zip
# setting app
WORKDIR /usr/share/nginx/html
RUN \
cp -R media /tmp/ &&\
cp restyaboard.conf /etc/nginx/conf.d &&\
sed -i 's/^.*listen.mode = 0660$/listen.mode = 0660/'\
/etc/php5/fpm/pool.d/www.conf &&\
sed -i 's|^.*fastcgi_pass.*$|fastcgi_pass unix:/var/run/php5-fpm.sock;|'\
/etc/nginx/conf.d/restyaboard.conf &&\
sed -i -e "/fastcgi_pass/a fastcgi_param HTTPS 'off';"\
/etc/nginx/conf.d/restyaboard.conf
RUN cp -R media /tmp/ \
&& cp restyaboard.conf /etc/nginx/conf.d \
&& sed -i 's/^.*listen.mode = 0660$/listen.mode = 0660/' /etc/php5/fpm/pool.d/www.conf \
&& sed -i 's|^.*fastcgi_pass.*$|fastcgi_pass unix:/var/run/php5-fpm.sock;|' /etc/nginx/conf.d/restyaboard.conf \
&& sed -i -e "/fastcgi_pass/a fastcgi_param HTTPS 'off';" /etc/nginx/conf.d/restyaboard.conf
# volume
VOLUME /usr/share/nginx/html/media
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment