File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM php:7-apache
2+
3+ RUN docker-php-ext-install exif
4+
5+ RUN set -eux; \
6+ \
7+ apt-get update; \
8+ apt-get install -y --no-install-recommends git; \
9+ rm -rf /var/lib/apt/lists/*; \
10+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
11+
12+ COPY --chown=www-data:www-data . /var/www/html
13+
14+ RUN set -eux; \
15+ \
16+ sed -i "s/BASE_PATH \\ . //" /var/www/html/config.php; \
17+ sed -i "s/'GIT_COMMIT_ENABLED', false/'GIT_COMMIT_ENABLED', true/" /var/www/html/config.php
18+
19+ VOLUME /pages
20+ EXPOSE 80
21+
22+ CMD /var/www/html/container-start.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # on empty volume copy default pages
5+ if ! test -f /pages/Home.md ; then
6+ cp /var/www/html/pages/* /pages
7+
8+ (
9+ cd /pages
10+ git init
11+ git config user.email " w2wiki@w2wiki"
12+ git config user.name " w2wiki"
13+
14+ git add -A .
15+ git commit -m " Init with default pages"
16+ )
17+ fi
18+
19+ mkdir -p /pages/images
20+ chown -R www-data:www-data /pages
21+
22+ exec apache2-foreground " $@ "
You can’t perform that action at this time.
0 commit comments