-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f0d301
commit 730b6a7
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ARG ALPINE_VERSION=3.20 | ||
ARG ALPINE_VERSION=3.21 | ||
FROM alpine:${ALPINE_VERSION} | ||
LABEL Maintainer="Tim de Pater <[email protected]>" | ||
LABEL Description="Lightweight container with Nginx 1.22 & PHP 8.2 based on Alpine Linux edge" | ||
LABEL Description="Lightweight container with Nginx 1.26 & PHP 8.4 based on Alpine Linux edge" | ||
|
||
ENV APP_ENV=prod | ||
ENV INSTALLATION_TYPE=docker | ||
|
@@ -15,13 +15,13 @@ ENV SSL_VERIFY_HOST=$SSL_VERIFY_HOST | |
ENV SECRET_REGISTER=$SECRET_REGISTER | ||
|
||
# Install packages and remove default server definition | ||
RUN apk --no-cache add php82 php82-fpm php82-opcache php82-json php82-openssl php82-curl php82-zlib php82-fileinfo \ | ||
php82-xml php82-simplexml php82-phar php82-intl php82-dom php82-xmlreader php82-ctype php82-session php82-gd \ | ||
php82-tokenizer php82-pdo php82-pdo_mysql php82-pdo_pgsql php82-iconv php82-zip php82-gmp php82-mbstring php82-xmlwriter \ | ||
RUN apk --no-cache add php84 php84-fpm php84-opcache php84-json php84-openssl php84-curl php84-zlib php84-fileinfo \ | ||
php84-xml php84-simplexml php84-phar php84-intl php84-dom php84-xmlreader php84-ctype php84-session php84-gd \ | ||
php84-tokenizer php84-pdo php84-pdo_mysql php84-pdo_pgsql php84-iconv php84-zip php84-gmp php84-mbstring php84-xmlwriter \ | ||
nginx supervisor curl | ||
|
||
# Create symlink so programs depending on `php` still function | ||
RUN ln -s /usr/bin/php82 /usr/bin/php | ||
RUN ln -s /usr/bin/php84 /usr/bin/php | ||
|
||
# Configure nginx | ||
COPY docker/nginx.conf /etc/nginx/nginx.conf | ||
|
@@ -30,8 +30,8 @@ COPY docker/fullchain.pem /etc/nginx/fullchain.pem | |
RUN rm -f /etc/nginx/conf.d/default.conf | ||
|
||
# Configure PHP-FPM | ||
COPY docker/fpm-pool.conf /etc/php82/php-fpm.d/www.conf | ||
COPY docker/php.ini /etc/php82/conf.d/custom.ini | ||
COPY docker/fpm-pool.conf /etc/php84/php-fpm.d/www.conf | ||
COPY docker/php.ini /etc/php84/conf.d/custom.ini | ||
|
||
# Configure supervisord | ||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
|
@@ -40,12 +40,12 @@ COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
RUN mkdir -p /var/www/html && mkdir -p /.composer | ||
|
||
# Make sure files/folders needed by the processes are accessable when they run under the nobody user | ||
RUN chown -R nobody.nobody /var/www/html && \ | ||
chown -R nobody.nobody /.composer && \ | ||
chown -R nobody.nobody /etc/nginx && \ | ||
chown -R nobody.nobody /run && \ | ||
chown -R nobody.nobody /var/lib/nginx && \ | ||
chown -R nobody.nobody /var/log/nginx | ||
RUN chown -R nobody:nobody /var/www/html && \ | ||
chown -R nobody:nobody /.composer && \ | ||
chown -R nobody:nobody /etc/nginx && \ | ||
chown -R nobody:nobody /run && \ | ||
chown -R nobody:nobody /var/lib/nginx && \ | ||
chown -R nobody:nobody /var/log/nginx | ||
|
||
# Switch to use a non-root user from here on | ||
USER nobody | ||
|
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