From 665279ec99d31c7d571f90bf0186edb268020bb8 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sun, 14 Aug 2016 16:20:06 +0200 Subject: [PATCH] Docker: update dependencies, introduce Composer Relates to https://github.com/shaarli/Shaarli/issues/607 Relates to https://github.com/shaarli/Shaarli/pull/612 Relates to https://github.com/shaarli/Shaarli/pull/624 Relates to https://github.com/shaarli/Shaarli/pull/633 See https://github.com/shaarli/Shaarli/wiki/Server-requirements Modifications: - [prod][stable] refactor Dockerfile - [prod][stable] set $TERM=dumb to avoid debconf-related issues - [prod][stable] install ca-certificates - [prod][stable] cleanup APT cache after installing packages - [prod][stable] use Composer to resolve PHP dependencies Signed-off-by: VirtualTam --- docker/production/stable/Dockerfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docker/production/stable/Dockerfile b/docker/production/stable/Dockerfile index 2bb3948c..178d1cef 100644 --- a/docker/production/stable/Dockerfile +++ b/docker/production/stable/Dockerfile @@ -1,17 +1,32 @@ FROM debian:jessie MAINTAINER Shaarli Community +ENV TERM dumb 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 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 +RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \ + && mv Shaarli-stable shaarli + && cd shaarli \ + && composer --prefer-dist --no-dev install RUN rm -rf html \ - && curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xvzf - \ - && mv Shaarli-stable shaarli \ - && chown -R www-data:www-data shaarli + && chown -R www-data:www-data . VOLUME /var/www/shaarli/data -- 2.41.0