Merge pull request #633 from virtualtam/docker/composer
Docker: update dependencies, introduce Composer
This commit is contained in:
commit
cc951468c0
2 changed files with 38 additions and 15 deletions
|
@ -1,26 +1,34 @@
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER Shaarli Community
|
MAINTAINER Shaarli Community
|
||||||
|
|
||||||
|
ENV TERM dumb
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install --no-install-recommends -y \
|
||||||
nginx-light php5-fpm php5-gd supervisor \
|
ca-certificates \
|
||||||
git nano
|
nginx-light \
|
||||||
|
php5-curl \
|
||||||
|
php5-fpm \
|
||||||
|
php5-gd \
|
||||||
|
php5-intl \
|
||||||
|
supervisor \
|
||||||
|
git \
|
||||||
|
nano \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
|
||||||
|
|
||||||
ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
|
ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
|
||||||
RUN chmod 755 /usr/local/bin/composer
|
RUN chmod 755 /usr/local/bin/composer
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
||||||
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
|
|
||||||
RUN echo "<?php phpinfo(); ?>" > /var/www/index.php
|
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
RUN git clone https://github.com/shaarli/Shaarli.git shaarli \
|
||||||
|
&& cd shaarli \
|
||||||
|
&& composer --prefer-dist install
|
||||||
RUN rm -rf html \
|
RUN rm -rf html \
|
||||||
&& git clone https://github.com/shaarli/Shaarli.git shaarli \
|
&& echo "<?php phpinfo(); ?>" > index.php \
|
||||||
&& chown -R www-data:www-data .
|
&& chown -R www-data:www-data .
|
||||||
|
|
||||||
WORKDIR /var/www/shaarli
|
|
||||||
RUN composer install
|
|
||||||
|
|
||||||
VOLUME /var/www/shaarli/data
|
VOLUME /var/www/shaarli/data
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
|
@ -1,17 +1,32 @@
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER Shaarli Community
|
MAINTAINER Shaarli Community
|
||||||
|
|
||||||
|
ENV TERM dumb
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y curl nginx-light php5-fpm php5-gd supervisor
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
nginx-light \
|
||||||
|
php5-curl \
|
||||||
|
php5-fpm \
|
||||||
|
php5-gd \
|
||||||
|
php5-intl \
|
||||||
|
supervisor \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
|
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
|
||||||
|
|
||||||
|
ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
|
||||||
|
RUN chmod 755 /usr/local/bin/composer
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
RUN rm -rf html \
|
RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \
|
||||||
&& curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xvzf - \
|
|
||||||
&& mv Shaarli-master shaarli \
|
&& mv Shaarli-master shaarli \
|
||||||
&& chown -R www-data:www-data shaarli
|
&& cd shaarli \
|
||||||
|
&& composer --prefer-dist --no-dev install
|
||||||
|
RUN rm -rf html \
|
||||||
|
&& chown -R www-data:www-data .
|
||||||
|
|
||||||
VOLUME /var/www/shaarli/data
|
VOLUME /var/www/shaarli/data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue