-
Notifications
You must be signed in to change notification settings - Fork 1
/
alpine.fpm.slim.Dockerfile
44 lines (34 loc) · 1.51 KB
/
alpine.fpm.slim.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
ARG PHP_VERSION=8.1
FROM php:${PHP_VERSION}-fpm-alpine
ARG PHP_VERSION
SHELL ["/bin/sh", "-euxo", "pipefail", "-c"]
LABEL org.opencontainers.image.authors="Tobias Hargesheimer <docker@ison.ws>" \
org.opencontainers.image.title="PHP-FPM" \
org.opencontainers.image.description="Alpine with PHP-FPM ${PHP_VERSION}" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://hub.docker.com/r/tobi312/php" \
org.opencontainers.image.source="https://github.com/Tob1as/docker-php"
ENV LANG C.UTF-8
ENV TERM=xterm
ENV CFLAGS="-I/usr/src/php"
# tzdata to set the timezones through the environment variables
RUN apk --no-cache add \
tzdata
# PHP-EXTENSION-INSTALLER
RUN \
PHP_EXTENSION_INSTALLER_VERSION=$(curl -s https://api.github.com/repos/mlocati/docker-php-extension-installer/releases/latest | grep 'tag_name' | cut -d '"' -f4) ; \
echo "install-php-extensions Version: ${PHP_EXTENSION_INSTALLER_VERSION}" ; \
curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/download/${PHP_EXTENSION_INSTALLER_VERSION}/install-php-extensions -o /usr/local/bin/install-php-extensions ; \
chmod +x /usr/local/bin/install-php-extensions
# PHP
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# ENTRYPOINT
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh ; \
#sed -i -e 's/\r$//' /usr/local/bin/entrypoint.sh ; \
mkdir /entrypoint.d
#WORKDIR /var/www/html
VOLUME /var/www/html
EXPOSE 9000
ENTRYPOINT ["entrypoint.sh"]
CMD ["php-fpm"]