aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker/production/Dockerfile
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-08-12 21:36:54 +0200
committerVirtualTam <virtualtam@flibidi.net>2016-08-14 16:21:30 +0200
commit90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6 (patch)
tree9e9c50994b76c35abd543dd296aa60b4d3a0c40e /docker/production/Dockerfile
parent8758bb0ac8cb68d32122009dbcb977d2f0fad2b0 (diff)
downloadShaarli-90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6.tar.gz
Shaarli-90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6.tar.zst
Shaarli-90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6.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 See https://github.com/shaarli/Shaarli/wiki/Server-requirements Modifications: - [all][env] set $TERM=dumb to avoid debconf-related issues - [all][pkg] install ca-certificates - [all][pkg] cleanup APT cache after installing packages - [dev] refactor Dockerfile - [prod][master] refactor Dockerfile - [prod][master][php] use Composer to resolve PHP dependencies Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'docker/production/Dockerfile')
-rw-r--r--docker/production/Dockerfile23
1 files changed, 19 insertions, 4 deletions
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile
index 3db4eb56..d93ed262 100644
--- a/docker/production/Dockerfile
+++ b/docker/production/Dockerfile
@@ -1,17 +1,32 @@
1FROM debian:jessie 1FROM debian:jessie
2MAINTAINER Shaarli Community 2MAINTAINER Shaarli Community
3 3
4ENV TERM dumb
4RUN apt-get update \ 5RUN 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
7COPY nginx.conf /etc/nginx/nginx.conf 17COPY nginx.conf /etc/nginx/nginx.conf
8COPY supervised.conf /etc/supervisor/conf.d/supervised.conf 18COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
9 19
20ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
21RUN chmod 755 /usr/local/bin/composer
22
10WORKDIR /var/www 23WORKDIR /var/www
11RUN rm -rf html \ 24RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \
12 && curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xvzf - \
13 && mv Shaarli-master shaarli \ 25 && mv Shaarli-master shaarli \
14 && chown -R www-data:www-data shaarli 26 && cd shaarli \
27 && composer --prefer-dist --no-dev install
28RUN rm -rf html \
29 && chown -R www-data:www-data .
15 30
16VOLUME /var/www/shaarli/data 31VOLUME /var/www/shaarli/data
17 32