diff options
author | VirtualTam <virtualtam@flibidi.net> | 2016-08-14 16:20:06 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-11-05 14:29:52 +0100 |
commit | f9a0b5ea4d7dd245b0b6933c7b1e58f357771426 (patch) | |
tree | bbcd808942dfa40a3864f91c81fa48597af29a88 /docker/production | |
parent | 2945434b0a0f138401282ced0b7e1012e4a0b1de (diff) | |
download | Shaarli-f9a0b5ea4d7dd245b0b6933c7b1e58f357771426.tar.gz Shaarli-f9a0b5ea4d7dd245b0b6933c7b1e58f357771426.tar.zst Shaarli-f9a0b5ea4d7dd245b0b6933c7b1e58f357771426.zip |
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 <virtualtam@flibidi.net>
Diffstat (limited to 'docker/production')
-rw-r--r-- | docker/production/stable/Dockerfile | 23 |
1 files 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 @@ | |||
1 | FROM debian:jessie | 1 | FROM debian:jessie |
2 | MAINTAINER Shaarli Community | 2 | MAINTAINER Shaarli Community |
3 | 3 | ||
4 | ENV TERM dumb | ||
4 | RUN apt-get update \ | 5 | RUN apt-get update \ |
5 | && apt-get install -y curl nginx-light php5-fpm php5-gd supervisor | 6 | && apt-get install --no-install-recommends -y \ |
7 | ca-certificates \ | ||
8 | curl \ | ||
9 | nginx-light \ | ||
10 | php5-curl \ | ||
11 | php5-fpm \ | ||
12 | php5-gd \ | ||
13 | php5-intl \ | ||
14 | supervisor \ | ||
15 | && apt-get clean | ||
6 | 16 | ||
7 | COPY nginx.conf /etc/nginx/nginx.conf | 17 | COPY nginx.conf /etc/nginx/nginx.conf |
8 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | 18 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf |
9 | 19 | ||
20 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
21 | RUN chmod 755 /usr/local/bin/composer | ||
22 | |||
10 | WORKDIR /var/www | 23 | WORKDIR /var/www |
24 | RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \ | ||
25 | && mv Shaarli-stable shaarli | ||
26 | && cd shaarli \ | ||
27 | && composer --prefer-dist --no-dev install | ||
11 | RUN rm -rf html \ | 28 | RUN rm -rf html \ |
12 | && curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xvzf - \ | 29 | && chown -R www-data:www-data . |
13 | && mv Shaarli-stable shaarli \ | ||
14 | && chown -R www-data:www-data shaarli | ||
15 | 30 | ||
16 | VOLUME /var/www/shaarli/data | 31 | VOLUME /var/www/shaarli/data |
17 | 32 | ||