1
- FROM alpine:edge
2
-
3
- LABEL Maintainer=
"Tim de Pater <[email protected] >" \
4
- Description="Lightweight container with Nginx 1.18 & PHP-FPM 7.3 based on Alpine Linux."
1
+ FROM alpine:3.14
2
+ LABEL Maintainer=
"Tim de Pater <[email protected] >"
3
+ LABEL Description="Lightweight container with Nginx 1.20 & PHP 8.0 based on Alpine Linux."
5
4
6
5
ENV APP_ENV=prod
7
6
ENV INSTALLATION_TYPE=docker
@@ -14,20 +13,23 @@ ENV SSL_VERIFY_HOST=$SSL_VERIFY_HOST
14
13
ENV SECRET_REGISTER=$SECRET_REGISTER
15
14
16
15
# Install packages and remove default server definition
17
- RUN apk --update add php7 php7-fpm php7-opcache php7-json php7-openssl php7-curl \
18
- php7-zlib php7-xml php7-simplexml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype php7-session \
19
- php7-tokenizer php7-pdo php7-pdo_mysql php7-pdo_pgsql php7-iconv php7-zip \
20
- php7-gmp php7-mbstring nginx supervisor nodejs nodejs npm curl && \
21
- rm -f /etc/nginx/conf.d/default.conf
16
+ RUN apk --no-cache add php8 php8-fpm php8-opcache php8-json php8-openssl php8-curl \
17
+ php8-zlib php8-xml php8-simplexml php8-phar php8-intl php8-dom php8-xmlreader php8-ctype php8-session \
18
+ php8-tokenizer php8-pdo php8-pdo_mysql php8-pdo_pgsql php8-iconv php8-zip \
19
+ php8-gmp php8-mbstring nginx supervisor nodejs nodejs npm curl
20
+
21
+ # Create symlink so programs depending on `php` still function
22
+ RUN ln -s /usr/bin/php8 /usr/bin/php
22
23
23
24
# Configure nginx
24
25
COPY docker/nginx.conf /etc/nginx/nginx.conf
25
26
COPY docker/privkey.pem /etc/nginx/privkey.pem
26
27
COPY docker/fullchain.pem /etc/nginx/fullchain.pem
28
+ RUN rm -f /etc/nginx/conf.d/default.conf
27
29
28
30
# Configure PHP-FPM
29
- COPY docker/fpm-pool.conf /etc/php7 /php-fpm.d/www.conf
30
- COPY docker/php.ini /etc/php7 /conf.d/custom.ini
31
+ COPY docker/fpm-pool.conf /etc/php8 /php-fpm.d/www.conf
32
+ COPY docker/php.ini /etc/php8 /conf.d/custom.ini
31
33
32
34
# Configure supervisord
33
35
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
@@ -39,8 +41,8 @@ RUN mkdir -p /var/www/html && mkdir -p /.composer && mkdir -p /.npm
39
41
RUN chown -R nobody.nobody /var/www/html && \
40
42
chown -R nobody.nobody /.composer && \
41
43
chown -R nobody.nobody /.npm && \
42
- chown -R nobody.nobody /run && \
43
44
chown -R nobody.nobody /etc/nginx && \
45
+ chown -R nobody.nobody /run && \
44
46
chown -R nobody.nobody /var/lib/nginx && \
45
47
chown -R nobody.nobody /var/log/nginx
46
48
0 commit comments