Skip to content

Commit 494d480

Browse files
committed
alpine image fix
1 parent c65b606 commit 494d480

File tree

6 files changed

+6
-20
lines changed

6 files changed

+6
-20
lines changed

alpine/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG OS_VERSION=3.18
55
## PHP-CLI stage
66
FROM alpine:${OS_VERSION} as cli
77

8-
ARG PHP_VERSION=82
8+
ARG PHP_VERSION=8.2
99

1010
ENV WORKDIR=/var/www/html \
1111
PHP_VERSION=${PHP_VERSION} \
@@ -32,6 +32,7 @@ ENV WORKDIR=/var/www/html \
3232
RUN export PHP_PACKAGE_VERSION=${PHP_VERSION/./} && \
3333
apk add --no-cache \
3434
bash \
35+
shadow \
3536
gettext \
3637
wget \
3738
ca-certificates \
@@ -92,7 +93,7 @@ RUN wget https://getcomposer.org/installer -O composer-setup.php && \
9293
# https://github.com/php/php-src/blob/17baa87faddc2550def3ae7314236826bc1b1398/sapi/fpm/php-fpm.8.in#L163
9394
STOPSIGNAL SIGQUIT
9495

95-
COPY --link ./etc/php/cli /etc/php/cli
96+
COPY --link ./etc/php /etc/php
9697
COPY --link --chmod=755 ./docker-entrypoint.d /docker-entrypoint.d
9798
COPY --link --chmod=755 ./docker-entrypoint /docker-entrypoint
9899

@@ -120,8 +121,6 @@ RUN export PHP_PACKAGE_VERSION=${PHP_VERSION/./} && \
120121
php${PHP_PACKAGE_VERSION}-fpm && \
121122
ln -s /usr/sbin/php-fpm${PHP_PACKAGE_VERSION} /usr/bin/php-fpm
122123

123-
COPY --link ./etc/php/fpm /etc/php/fpm
124-
125124
EXPOSE ${FPM_LISTEN_PORT}
126125

127126
CMD [ "/usr/bin/php-fpm", "--nodaemonize" ]

alpine/docker-entrypoint.d/10-compile-templates

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/sh
22

3+
export PHP_PACKAGE_VERSION=${PHP_VERSION/./}
34
TEMPLATE_FILES=$(find /etc/php -name "*.*.template")
45

56
for TEMPLATE_FILE_PATH in ${TEMPLATE_FILES}

alpine/etc/php/cli/99-docker-php-config.ini.template

Lines changed: 0 additions & 14 deletions
This file was deleted.
File renamed without changes.

alpine/etc/php/fpm/conf.d/99_docker_php_config.ini.template renamed to alpine/etc/php/conf.d/99_docker_php_config.ini.template

File renamed without changes.

alpine/etc/php/fpm/php-fpm.d/www.conf.template renamed to alpine/etc/php/php-fpm.d/www.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[www]
2-
user = www-data
3-
group = www-data
2+
user = nobody
3+
group = nobody
44
listen = ${FPM_LISTEN_PORT}
55
clear_env = no
66

0 commit comments

Comments
 (0)