diff options
author | VirtualTam <virtualtam@flibidi.net> | 2016-08-14 16:28:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-14 16:28:07 +0200 |
commit | cc951468c01a708b5a0787fdfc8b1ca6e11b3c9b (patch) | |
tree | 9e9c50994b76c35abd543dd296aa60b4d3a0c40e /docker | |
parent | 8758bb0ac8cb68d32122009dbcb977d2f0fad2b0 (diff) | |
parent | 90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6 (diff) | |
download | Shaarli-cc951468c01a708b5a0787fdfc8b1ca6e11b3c9b.tar.gz Shaarli-cc951468c01a708b5a0787fdfc8b1ca6e11b3c9b.tar.zst Shaarli-cc951468c01a708b5a0787fdfc8b1ca6e11b3c9b.zip |
Merge pull request #633 from virtualtam/docker/composer
Docker: update dependencies, introduce Composer
Diffstat (limited to 'docker')
-rw-r--r-- | docker/development/Dockerfile | 30 | ||||
-rw-r--r-- | docker/production/Dockerfile | 23 |
2 files changed, 38 insertions, 15 deletions
diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index 2ed59b89..0c19b085 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile | |||
@@ -1,26 +1,34 @@ | |||
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 \ | 6 | && apt-get install --no-install-recommends -y \ |
6 | nginx-light php5-fpm php5-gd supervisor \ | 7 | ca-certificates \ |
7 | git nano | 8 | nginx-light \ |
8 | 9 | php5-curl \ | |
9 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | 10 | php5-fpm \ |
10 | RUN chmod 755 /usr/local/bin/composer | 11 | php5-gd \ |
12 | php5-intl \ | ||
13 | supervisor \ | ||
14 | git \ | ||
15 | nano \ | ||
16 | && apt-get clean | ||
11 | 17 | ||
12 | COPY nginx.conf /etc/nginx/nginx.conf | 18 | COPY nginx.conf /etc/nginx/nginx.conf |
13 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | 19 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf |
14 | RUN echo "<?php phpinfo(); ?>" > /var/www/index.php | 20 | |
21 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
22 | RUN chmod 755 /usr/local/bin/composer | ||
15 | 23 | ||
16 | WORKDIR /var/www | 24 | WORKDIR /var/www |
25 | RUN git clone https://github.com/shaarli/Shaarli.git shaarli \ | ||
26 | && cd shaarli \ | ||
27 | && composer --prefer-dist install | ||
17 | RUN rm -rf html \ | 28 | RUN rm -rf html \ |
18 | && git clone https://github.com/shaarli/Shaarli.git shaarli \ | 29 | && echo "<?php phpinfo(); ?>" > index.php \ |
19 | && chown -R www-data:www-data . | 30 | && chown -R www-data:www-data . |
20 | 31 | ||
21 | WORKDIR /var/www/shaarli | ||
22 | RUN composer install | ||
23 | |||
24 | VOLUME /var/www/shaarli/data | 32 | VOLUME /var/www/shaarli/data |
25 | 33 | ||
26 | EXPOSE 80 | 34 | EXPOSE 80 |
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 @@ | |||
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 |
11 | RUN rm -rf html \ | 24 | RUN 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 | ||
28 | RUN rm -rf html \ | ||
29 | && chown -R www-data:www-data . | ||
15 | 30 | ||
16 | VOLUME /var/www/shaarli/data | 31 | VOLUME /var/www/shaarli/data |
17 | 32 | ||