File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1
- FROM php:7.3-apache
2
-
1
+ FROM php:7.4-apache
3
2
# Adds jpeg-support for gd
4
3
RUN apt-get update && apt-get install -y \
5
4
libfreetype6-dev \
@@ -8,8 +7,13 @@ RUN apt-get update && apt-get install -y \
8
7
git \
9
8
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
10
9
&& docker-php-ext-install -j$(nproc) gd
11
-
10
+ # Enable rewrite
12
11
RUN a2enmod rewrite
12
+ # Copy custom apache conf
13
13
COPY ./system/docker/apache2.conf /etc/apache2/apache2.conf
14
-
14
+ # Customize the php entrypoint to clean up permissions
15
+ COPY ./system/docker/docker-php-entrypoint /usr/local/bin/
16
+ # Make sure the entrypoint is executable
17
+ RUN chmod +x /usr/local/bin/docker-php-entrypoint
18
+ # Copy HAXcms into the web root directory
15
19
COPY --chown=www-data:www-data . /var/www/html
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ # first arg is `-f` or `--some-option`
5
+ if [ " ${1# -} " != " $1 " ]; then
6
+ set -- apache2-foreground " $@ "
7
+ fi
8
+
9
+ echo " updating permissions"
10
+ find /var/www/html -not -user www-data -execdir chown www-data:www-data {} \+
11
+
12
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments