forked from sebsauvage/Shaarli
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1156 from virtualtam/v0.8-dockerfile
v0.8 - Build the Docker image from the local sources
- Loading branch information
Showing
19 changed files
with
112 additions
and
298 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Docker-ignore | ||
# Note: .git/ is kept for HTML documentation generation | ||
tests | ||
|
||
# Shaarli runtime resources | ||
cache/* | ||
data/* | ||
pagecache/* | ||
tmp/* | ||
|
||
# Eclipse project files | ||
.settings | ||
.buildpath | ||
.project | ||
|
||
# Raintpl generated pages | ||
*.rtpl.php | ||
|
||
# 3rd-party dependencies | ||
composer.lock | ||
vendor/ | ||
|
||
# Release archives | ||
*.tar | ||
*.zip | ||
|
||
# Development and test resources | ||
coverage | ||
doxygen | ||
sandbox | ||
phpmd.html | ||
|
||
# User plugin configuration | ||
plugins/*/config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Stage 1: | ||
# - Get Shaarli sources | ||
# - Build documentation | ||
FROM dalibo/pandocker:stable as docs | ||
ADD . /pandoc/shaarli | ||
RUN cd /pandoc/shaarli \ | ||
&& make htmldoc \ | ||
&& rm -rf .git | ||
|
||
# Stage 2: | ||
# - Resolve PHP dependencies with Composer | ||
FROM composer:latest as composer | ||
COPY --from=docs /pandoc/shaarli /app/shaarli | ||
RUN cd shaarli \ | ||
&& composer --prefer-dist --no-dev install | ||
|
||
# Stage 3: | ||
# - Shaarli image | ||
FROM debian:jessie | ||
LABEL maintainer="Shaarli Community" | ||
|
||
ENV TERM dumb | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
curl \ | ||
nginx-light \ | ||
php5-curl \ | ||
php5-fpm \ | ||
php5-gd \ | ||
php5-intl \ | ||
supervisor \ | ||
&& apt-get clean | ||
|
||
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini \ | ||
&& sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
|
||
COPY .docker/nginx.conf /etc/nginx/nginx.conf | ||
COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
|
||
WORKDIR /var/www | ||
COPY --from=composer /app/shaarli shaarli | ||
RUN rm -rf html \ | ||
&& chown -R www-data:www-data . | ||
|
||
VOLUME /var/www/shaarli/data | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.