]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Docker: update dependencies, introduce Composer 638/head
authorVirtualTam <virtualtam@flibidi.net>
Sun, 14 Aug 2016 14:20:06 +0000 (16:20 +0200)
committerVirtualTam <virtualtam@flibidi.net>
Sun, 14 Aug 2016 14:23:57 +0000 (16:23 +0200)
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 <virtualtam@flibidi.net>
docker/production/stable/Dockerfile

index 2bb3948ce6d369ce8cd5a1291be6e7d56e6b57f3..178d1cef1bffc3d47b0ab4861b81f913a27c0667 100644 (file)
@@ -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