diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2018-06-20 16:59:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 16:59:29 +0200 |
commit | 6325e74caa464818000066b5112cfd293e168e50 (patch) | |
tree | 8c452980d8c7d6f98aa61e2d814377a1efc70fb3 | |
parent | 26b0b2022870a540c1a6d54e949c4bdc1486daed (diff) | |
parent | c064d3179e0396983bdf8dee545388e4142ed842 (diff) | |
download | Shaarli-6325e74caa464818000066b5112cfd293e168e50.tar.gz Shaarli-6325e74caa464818000066b5112cfd293e168e50.tar.zst Shaarli-6325e74caa464818000066b5112cfd293e168e50.zip |
Merge pull request #1158 from virtualtam/master-dockerfile
Master: Build the Docker images from the local sources
-rw-r--r-- | .docker/.htaccess (renamed from docker/.htaccess) | 0 | ||||
-rw-r--r-- | .docker/nginx.conf (renamed from docker/alpine/nginx.conf) | 0 | ||||
-rw-r--r-- | .docker/php-fpm.conf (renamed from docker/alpine/php-fpm.conf) | 0 | ||||
-rwxr-xr-x | .docker/services.d/.s6-svscan/finish (renamed from docker/alpine/services.d/.s6-svscan/finish) | 0 | ||||
-rwxr-xr-x | .docker/services.d/nginx/run (renamed from docker/alpine/services.d/nginx/run) | 0 | ||||
-rwxr-xr-x | .docker/services.d/php-fpm/run (renamed from docker/alpine/services.d/php-fpm/run) | 0 | ||||
-rw-r--r-- | .dockerignore | 51 | ||||
-rw-r--r-- | .gitattributes | 4 | ||||
-rw-r--r-- | Dockerfile (renamed from docker/alpine/Dockerfile.master) | 25 | ||||
-rw-r--r-- | Dockerfile.armhf (renamed from docker/alpine/Dockerfile.armhf.master) | 8 | ||||
-rw-r--r-- | doc/md/Unit-tests-Docker.md | 6 | ||||
-rw-r--r-- | doc/md/docker/shaarli-images.md | 14 | ||||
-rw-r--r-- | docker/alpine/Dockerfile.armhf.latest | 49 | ||||
-rw-r--r-- | docker/alpine/Dockerfile.latest | 54 | ||||
-rw-r--r-- | docker/alpine/IMAGE.md | 10 | ||||
-rw-r--r-- | docker/debian/Dockerfile.stable | 37 | ||||
-rw-r--r-- | docker/debian/IMAGE.md | 5 | ||||
-rw-r--r-- | docker/debian/nginx.conf | 72 | ||||
-rw-r--r-- | docker/debian/supervised.conf | 13 | ||||
-rw-r--r-- | tests/docker/alpine36/Dockerfile (renamed from docker/test/alpine36/Dockerfile) | 0 | ||||
-rw-r--r-- | tests/docker/debian8/Dockerfile (renamed from docker/test/debian8/Dockerfile) | 0 | ||||
-rw-r--r-- | tests/docker/debian9/Dockerfile (renamed from docker/test/debian9/Dockerfile) | 0 | ||||
-rw-r--r-- | tests/docker/ubuntu16/Dockerfile (renamed from docker/test/ubuntu16/Dockerfile) | 0 |
23 files changed, 87 insertions, 261 deletions
diff --git a/docker/.htaccess b/.docker/.htaccess index f601c1ee..f601c1ee 100644 --- a/docker/.htaccess +++ b/.docker/.htaccess | |||
diff --git a/docker/alpine/nginx.conf b/.docker/nginx.conf index 07fba33f..07fba33f 100644 --- a/docker/alpine/nginx.conf +++ b/.docker/nginx.conf | |||
diff --git a/docker/alpine/php-fpm.conf b/.docker/php-fpm.conf index 0843c164..0843c164 100644 --- a/docker/alpine/php-fpm.conf +++ b/.docker/php-fpm.conf | |||
diff --git a/docker/alpine/services.d/.s6-svscan/finish b/.docker/services.d/.s6-svscan/finish index 1dadeeaf..1dadeeaf 100755 --- a/docker/alpine/services.d/.s6-svscan/finish +++ b/.docker/services.d/.s6-svscan/finish | |||
diff --git a/docker/alpine/services.d/nginx/run b/.docker/services.d/nginx/run index 21e7b0d6..21e7b0d6 100755 --- a/docker/alpine/services.d/nginx/run +++ b/.docker/services.d/nginx/run | |||
diff --git a/docker/alpine/services.d/php-fpm/run b/.docker/services.d/php-fpm/run index 21dd0107..21dd0107 100755 --- a/docker/alpine/services.d/php-fpm/run +++ b/.docker/services.d/php-fpm/run | |||
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..a0d28dc6 --- /dev/null +++ b/.dockerignore | |||
@@ -0,0 +1,51 @@ | |||
1 | # Docker-ignore | ||
2 | .dev | ||
3 | .git | ||
4 | .github | ||
5 | tests | ||
6 | |||
7 | # Shaarli runtime resources | ||
8 | cache/* | ||
9 | data/* | ||
10 | pagecache/* | ||
11 | tmp/* | ||
12 | |||
13 | # Eclipse project files | ||
14 | .settings | ||
15 | .buildpath | ||
16 | .project | ||
17 | |||
18 | # Raintpl generated pages | ||
19 | *.rtpl.php | ||
20 | |||
21 | # 3rd-party dependencies | ||
22 | vendor/ | ||
23 | |||
24 | # Release archives | ||
25 | *.tar.gz | ||
26 | *.zip | ||
27 | inc/languages/*/LC_MESSAGES/shaarli.mo | ||
28 | |||
29 | # Development and test resources | ||
30 | coverage | ||
31 | doxygen | ||
32 | sandbox | ||
33 | phpmd.html | ||
34 | |||
35 | # User plugin configuration | ||
36 | plugins/*/config.php | ||
37 | |||
38 | # 3rd party themes | ||
39 | tpl/* | ||
40 | !tpl/default | ||
41 | !tpl/vintage | ||
42 | |||
43 | # Front end | ||
44 | node_modules | ||
45 | tpl/default/js | ||
46 | tpl/default/css | ||
47 | tpl/default/fonts | ||
48 | tpl/default/img | ||
49 | tpl/vintage/js | ||
50 | tpl/vintage/css | ||
51 | tpl/vintage/img | ||
diff --git a/.gitattributes b/.gitattributes index 6b6ffbd5..9d22f11b 100644 --- a/.gitattributes +++ b/.gitattributes | |||
@@ -33,7 +33,9 @@ Dockerfile text | |||
33 | .travis.yml export-ignore | 33 | .travis.yml export-ignore |
34 | doc/**/*.json export-ignore | 34 | doc/**/*.json export-ignore |
35 | doc/**/*.md export-ignore | 35 | doc/**/*.md export-ignore |
36 | docker/ export-ignore | 36 | .docker/ export-ignore |
37 | .dockerignore export-ignore | ||
38 | Dockerfile* export-ignore | ||
37 | Doxyfile export-ignore | 39 | Doxyfile export-ignore |
38 | Makefile export-ignore | 40 | Makefile export-ignore |
39 | node_modules/ export-ignore | 41 | node_modules/ export-ignore |
diff --git a/docker/alpine/Dockerfile.master b/Dockerfile index 7bbe1fb7..4cda6f31 100644 --- a/docker/alpine/Dockerfile.master +++ b/Dockerfile | |||
@@ -1,13 +1,20 @@ | |||
1 | # Stage 1: | 1 | # Stage 1: |
2 | # - Get Shaarli sources | 2 | # - Copy Shaarli sources |
3 | # - Build documentation | ||
4 | FROM python:3-alpine as docs | ||
5 | ADD . /usr/src/app/shaarli | ||
6 | RUN cd /usr/src/app/shaarli \ | ||
7 | && pip install --no-cache-dir mkdocs \ | ||
8 | && mkdocs build | ||
9 | |||
10 | # Stage 2: | ||
3 | # - Resolve PHP dependencies with Composer | 11 | # - Resolve PHP dependencies with Composer |
4 | FROM composer:latest as composer | 12 | FROM composer:latest as composer |
5 | RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ | 13 | COPY --from=docs /usr/src/app/shaarli /app/shaarli |
6 | && mv Shaarli-master shaarli \ | 14 | RUN cd shaarli \ |
7 | && cd shaarli \ | ||
8 | && composer --prefer-dist --no-dev install | 15 | && composer --prefer-dist --no-dev install |
9 | 16 | ||
10 | # Stage 2: | 17 | # Stage 3: |
11 | # - Frontend dependencies | 18 | # - Frontend dependencies |
12 | FROM node:9.9-alpine as node | 19 | FROM node:9.9-alpine as node |
13 | COPY --from=composer /app/shaarli shaarli | 20 | COPY --from=composer /app/shaarli shaarli |
@@ -16,7 +23,7 @@ RUN cd shaarli \ | |||
16 | && yarn run build \ | 23 | && yarn run build \ |
17 | && rm -rf node_modules | 24 | && rm -rf node_modules |
18 | 25 | ||
19 | # Stage 3: | 26 | # Stage 4: |
20 | # - Shaarli image | 27 | # - Shaarli image |
21 | FROM alpine:3.6 | 28 | FROM alpine:3.6 |
22 | LABEL maintainer="Shaarli Community" | 29 | LABEL maintainer="Shaarli Community" |
@@ -39,9 +46,9 @@ RUN apk --update --no-cache add \ | |||
39 | php7-zlib \ | 46 | php7-zlib \ |
40 | s6 | 47 | s6 |
41 | 48 | ||
42 | COPY nginx.conf /etc/nginx/nginx.conf | 49 | COPY .docker/nginx.conf /etc/nginx/nginx.conf |
43 | COPY php-fpm.conf /etc/php7/php-fpm.conf | 50 | COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf |
44 | COPY services.d /etc/services.d | 51 | COPY .docker/services.d /etc/services.d |
45 | 52 | ||
46 | RUN rm -rf /etc/php7/php-fpm.d/www.conf \ | 53 | RUN rm -rf /etc/php7/php-fpm.d/www.conf \ |
47 | && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ | 54 | && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ |
diff --git a/docker/alpine/Dockerfile.armhf.master b/Dockerfile.armhf index 6c89adc3..5dcc34aa 100644 --- a/docker/alpine/Dockerfile.armhf.master +++ b/Dockerfile.armhf | |||
@@ -1,5 +1,5 @@ | |||
1 | FROM lsiobase/alpine.armhf:3.6 | 1 | FROM lsiobase/alpine.armhf:3.6 |
2 | MAINTAINER Shaarli Community | 2 | LABEL maintainer="Shaarli Community" |
3 | 3 | ||
4 | RUN apk --update --no-cache add \ | 4 | RUN apk --update --no-cache add \ |
5 | ca-certificates \ | 5 | ca-certificates \ |
@@ -21,9 +21,9 @@ RUN apk --update --no-cache add \ | |||
21 | php7-zlib \ | 21 | php7-zlib \ |
22 | s6 | 22 | s6 |
23 | 23 | ||
24 | COPY nginx.conf /etc/nginx/nginx.conf | 24 | COPY .docker/nginx.conf /etc/nginx/nginx.conf |
25 | COPY php-fpm.conf /etc/php7/php-fpm.conf | 25 | COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf |
26 | COPY services.d /etc/services.d | 26 | COPY .docker/services.d /etc/services.d |
27 | 27 | ||
28 | RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \ | 28 | RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \ |
29 | && rm -rf /etc/php7/php-fpm.d/www.conf \ | 29 | && rm -rf /etc/php7/php-fpm.d/www.conf \ |
diff --git a/doc/md/Unit-tests-Docker.md b/doc/md/Unit-tests-Docker.md index c2de7cc7..59bd5b45 100644 --- a/doc/md/Unit-tests-Docker.md +++ b/doc/md/Unit-tests-Docker.md | |||
@@ -8,7 +8,7 @@ Read first: | |||
8 | 8 | ||
9 | ### Docker test images | 9 | ### Docker test images |
10 | 10 | ||
11 | Test Dockerfiles are located under `docker/tests/<distribution>/Dockerfile`, | 11 | Test Dockerfiles are located under `tests/docker/<distribution>/Dockerfile`, |
12 | and can be used to build Docker images to run Shaarli test suites under common | 12 | and can be used to build Docker images to run Shaarli test suites under common |
13 | Linux environments. | 13 | Linux environments. |
14 | 14 | ||
@@ -27,7 +27,7 @@ What's behind the curtains: | |||
27 | - test PHP dependencies (OS packages) | 27 | - test PHP dependencies (OS packages) |
28 | - Composer | 28 | - Composer |
29 | - the local workspace is mapped to the container's `/shaarli/` directory, | 29 | - the local workspace is mapped to the container's `/shaarli/` directory, |
30 | - the files are rsync'd to so tests are run using a standard Linux user account | 30 | - the files are rsync'd so tests are run using a standard Linux user account |
31 | (running tests as `root` would bypass permission checks and may hide issues) | 31 | (running tests as `root` would bypass permission checks and may hide issues) |
32 | - the tests are run inside the container. | 32 | - the tests are run inside the container. |
33 | 33 | ||
@@ -36,7 +36,7 @@ What's behind the curtains: | |||
36 | ```bash | 36 | ```bash |
37 | # build the Debian 9 Docker image | 37 | # build the Debian 9 Docker image |
38 | $ cd /path/to/shaarli | 38 | $ cd /path/to/shaarli |
39 | $ cd docker/test/debian9 | 39 | $ cd tests/docker/debian9 |
40 | $ docker build -t shaarli-test:debian9 . | 40 | $ docker build -t shaarli-test:debian9 . |
41 | ``` | 41 | ``` |
42 | 42 | ||
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 12f7b5d1..e6fbff64 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md | |||
@@ -8,9 +8,9 @@ The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaa | |||
8 | repository. | 8 | repository. |
9 | 9 | ||
10 | ### Available image tags | 10 | ### Available image tags |
11 | - `latest`: latest branch (tarball release) | 11 | - `latest`: latest branch |
12 | - `master`: master branch (tarball release) | 12 | - `master`: master branch |
13 | - `stable`: stable branch (tarball release) | 13 | - `stable`: stable branch |
14 | 14 | ||
15 | The `latest` and `master` images rely on: | 15 | The `latest` and `master` images rely on: |
16 | 16 | ||
@@ -24,7 +24,13 @@ The `stable` image relies on: | |||
24 | - [PHP5-FPM](http://php-fpm.org/) | 24 | - [PHP5-FPM](http://php-fpm.org/) |
25 | - [Nginx](http://nginx.org/) | 25 | - [Nginx](http://nginx.org/) |
26 | 26 | ||
27 | Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). | 27 | Additional Dockerfiles are provided for the `arm32v7` platform, relying on |
28 | [Linuxserver.io Alpine armhf | ||
29 | images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be | ||
30 | built using [`docker | ||
31 | build`](https://docs.docker.com/engine/reference/commandline/build/) on an | ||
32 | `arm32v7` machine or using an emulator such as | ||
33 | [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). | ||
28 | 34 | ||
29 | ### Download from DockerHub | 35 | ### Download from DockerHub |
30 | ```bash | 36 | ```bash |
diff --git a/docker/alpine/Dockerfile.armhf.latest b/docker/alpine/Dockerfile.armhf.latest deleted file mode 100644 index 824a1926..00000000 --- a/docker/alpine/Dockerfile.armhf.latest +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | FROM lsiobase/alpine.armhf:3.6 | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | RUN apk --update --no-cache add \ | ||
5 | ca-certificates \ | ||
6 | curl \ | ||
7 | nginx \ | ||
8 | php7 \ | ||
9 | php7-ctype \ | ||
10 | php7-curl \ | ||
11 | php7-fpm \ | ||
12 | php7-gd \ | ||
13 | php7-iconv \ | ||
14 | php7-intl \ | ||
15 | php7-json \ | ||
16 | php7-mbstring \ | ||
17 | php7-openssl \ | ||
18 | php7-phar \ | ||
19 | php7-session \ | ||
20 | php7-xml \ | ||
21 | php7-zlib \ | ||
22 | s6 | ||
23 | |||
24 | COPY nginx.conf /etc/nginx/nginx.conf | ||
25 | COPY php-fpm.conf /etc/php7/php-fpm.conf | ||
26 | COPY services.d /etc/services.d | ||
27 | |||
28 | RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \ | ||
29 | && rm -rf /etc/php7/php-fpm.d/www.conf \ | ||
30 | && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ | ||
31 | && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini | ||
32 | |||
33 | |||
34 | WORKDIR /var/www | ||
35 | RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \ | ||
36 | && mv Shaarli-latest shaarli \ | ||
37 | && cd shaarli \ | ||
38 | && composer --prefer-dist --no-dev install \ | ||
39 | && rm -rf ~/.composer \ | ||
40 | && chown -R nginx:nginx . \ | ||
41 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ | ||
42 | && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log | ||
43 | |||
44 | VOLUME /var/www/shaarli/data | ||
45 | |||
46 | EXPOSE 80 | ||
47 | |||
48 | ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"] | ||
49 | CMD [] | ||
diff --git a/docker/alpine/Dockerfile.latest b/docker/alpine/Dockerfile.latest deleted file mode 100644 index 755d8751..00000000 --- a/docker/alpine/Dockerfile.latest +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | # Stage 1: | ||
2 | # - Get Shaarli sources | ||
3 | # - Resolve PHP dependencies with Composer | ||
4 | FROM composer:latest as composer | ||
5 | RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \ | ||
6 | && mv Shaarli-latest shaarli \ | ||
7 | && cd shaarli \ | ||
8 | && composer --prefer-dist --no-dev install | ||
9 | |||
10 | # Stage 2: | ||
11 | # - Shaarli image | ||
12 | FROM alpine:3.6 | ||
13 | LABEL maintainer="Shaarli Community" | ||
14 | |||
15 | RUN apk --update --no-cache add \ | ||
16 | ca-certificates \ | ||
17 | nginx \ | ||
18 | php7 \ | ||
19 | php7-ctype \ | ||
20 | php7-curl \ | ||
21 | php7-fpm \ | ||
22 | php7-gd \ | ||
23 | php7-iconv \ | ||
24 | php7-intl \ | ||
25 | php7-json \ | ||
26 | php7-mbstring \ | ||
27 | php7-openssl \ | ||
28 | php7-session \ | ||
29 | php7-xml \ | ||
30 | php7-zlib \ | ||
31 | s6 | ||
32 | |||
33 | COPY nginx.conf /etc/nginx/nginx.conf | ||
34 | COPY php-fpm.conf /etc/php7/php-fpm.conf | ||
35 | COPY services.d /etc/services.d | ||
36 | |||
37 | RUN rm -rf /etc/php7/php-fpm.d/www.conf \ | ||
38 | && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ | ||
39 | && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini | ||
40 | |||
41 | |||
42 | WORKDIR /var/www | ||
43 | COPY --from=composer /app/shaarli shaarli | ||
44 | |||
45 | RUN chown -R nginx:nginx . \ | ||
46 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ | ||
47 | && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log | ||
48 | |||
49 | VOLUME /var/www/shaarli/data | ||
50 | |||
51 | EXPOSE 80 | ||
52 | |||
53 | ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"] | ||
54 | CMD [] | ||
diff --git a/docker/alpine/IMAGE.md b/docker/alpine/IMAGE.md deleted file mode 100644 index a8952257..00000000 --- a/docker/alpine/IMAGE.md +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | ## Alpine images | ||
2 | - [Alpine Linux](https://www.alpinelinux.org/) | ||
3 | - [PHP-FPM](http://php-fpm.org/) | ||
4 | - [Nginx](http://nginx.org/) | ||
5 | |||
6 | ### `shaarli/shaarli:latest` | ||
7 | - [Shaarli](https://github.com/shaarli/Shaarli), `latest` branch | ||
8 | |||
9 | ### `shaarli/shaarli:master` | ||
10 | - [Shaarli](https://github.com/shaarli/Shaarli), `master` branch | ||
diff --git a/docker/debian/Dockerfile.stable b/docker/debian/Dockerfile.stable deleted file mode 100644 index fc9588b0..00000000 --- a/docker/debian/Dockerfile.stable +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | FROM debian:jessie | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | ENV TERM dumb | ||
5 | RUN apt-get update \ | ||
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 | ||
16 | |||
17 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini | ||
18 | RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
19 | COPY nginx.conf /etc/nginx/nginx.conf | ||
20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
21 | |||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
25 | WORKDIR /var/www | ||
26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \ | ||
27 | && mv Shaarli-stable shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
32 | |||
33 | VOLUME /var/www/shaarli/data | ||
34 | |||
35 | EXPOSE 80 | ||
36 | |||
37 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||
diff --git a/docker/debian/IMAGE.md b/docker/debian/IMAGE.md deleted file mode 100644 index d85b1d7a..00000000 --- a/docker/debian/IMAGE.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | ## shaarli:stable | ||
2 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) | ||
3 | - [PHP5-FPM](http://php-fpm.org/) | ||
4 | - [Nginx](http://nginx.org/) | ||
5 | - [Shaarli (stable)](https://github.com/shaarli/Shaarli/tree/stable) | ||
diff --git a/docker/debian/nginx.conf b/docker/debian/nginx.conf deleted file mode 100644 index e8754d9b..00000000 --- a/docker/debian/nginx.conf +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | user www-data www-data; | ||
2 | daemon off; | ||
3 | worker_processes 4; | ||
4 | |||
5 | events { | ||
6 | worker_connections 768; | ||
7 | } | ||
8 | |||
9 | http { | ||
10 | include mime.types; | ||
11 | default_type application/octet-stream; | ||
12 | keepalive_timeout 20; | ||
13 | |||
14 | client_max_body_size 10m; | ||
15 | |||
16 | index index.html index.php; | ||
17 | |||
18 | server { | ||
19 | listen 80; | ||
20 | root /var/www/shaarli; | ||
21 | |||
22 | access_log /var/log/nginx/shaarli.access.log; | ||
23 | error_log /var/log/nginx/shaarli.error.log; | ||
24 | |||
25 | location ~ /\. { | ||
26 | # deny access to dotfiles | ||
27 | access_log off; | ||
28 | log_not_found off; | ||
29 | deny all; | ||
30 | } | ||
31 | |||
32 | location ~ ~$ { | ||
33 | # deny access to temp editor files, e.g. "script.php~" | ||
34 | access_log off; | ||
35 | log_not_found off; | ||
36 | deny all; | ||
37 | } | ||
38 | |||
39 | location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | ||
40 | # cache static assets | ||
41 | expires max; | ||
42 | add_header Pragma public; | ||
43 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
44 | } | ||
45 | |||
46 | location = /favicon.ico { | ||
47 | # serve the Shaarli favicon from its custom location | ||
48 | alias /var/www/shaarli/images/favicon.ico; | ||
49 | } | ||
50 | |||
51 | location / { | ||
52 | # Slim - rewrite URLs | ||
53 | try_files $uri /index.php$is_args$args; | ||
54 | } | ||
55 | |||
56 | location ~ (index)\.php$ { | ||
57 | # Slim - split URL path into (script_filename, path_info) | ||
58 | try_files $uri =404; | ||
59 | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
60 | |||
61 | # filter and proxy PHP requests to PHP-FPM | ||
62 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
63 | fastcgi_index index.php; | ||
64 | include fastcgi.conf; | ||
65 | } | ||
66 | |||
67 | location ~ \.php$ { | ||
68 | # deny access to all other PHP scripts | ||
69 | deny all; | ||
70 | } | ||
71 | } | ||
72 | } | ||
diff --git a/docker/debian/supervised.conf b/docker/debian/supervised.conf deleted file mode 100644 index 5acd9795..00000000 --- a/docker/debian/supervised.conf +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [program:php5-fpm] | ||
2 | command=/usr/sbin/php5-fpm -F | ||
3 | priority=5 | ||
4 | autostart=true | ||
5 | autorestart=true | ||
6 | |||
7 | [program:nginx] | ||
8 | command=/usr/sbin/nginx | ||
9 | priority=10 | ||
10 | autostart=true | ||
11 | autorestart=true | ||
12 | stdout_events_enabled=true | ||
13 | stderr_events_enabled=true | ||
diff --git a/docker/test/alpine36/Dockerfile b/tests/docker/alpine36/Dockerfile index fa84f6e2..fa84f6e2 100644 --- a/docker/test/alpine36/Dockerfile +++ b/tests/docker/alpine36/Dockerfile | |||
diff --git a/docker/test/debian8/Dockerfile b/tests/docker/debian8/Dockerfile index eaa34e9b..eaa34e9b 100644 --- a/docker/test/debian8/Dockerfile +++ b/tests/docker/debian8/Dockerfile | |||
diff --git a/docker/test/debian9/Dockerfile b/tests/docker/debian9/Dockerfile index 3ab4b93d..3ab4b93d 100644 --- a/docker/test/debian9/Dockerfile +++ b/tests/docker/debian9/Dockerfile | |||
diff --git a/docker/test/ubuntu16/Dockerfile b/tests/docker/ubuntu16/Dockerfile index e53ed9e3..e53ed9e3 100644 --- a/docker/test/ubuntu16/Dockerfile +++ b/tests/docker/ubuntu16/Dockerfile | |||