-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile.php82
More file actions
74 lines (66 loc) · 1.72 KB
/
Dockerfile.php82
File metadata and controls
74 lines (66 loc) · 1.72 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM php:8.2-fpm
RUN apt-get update \
&& apt-get install -y \
busybox-static \
git \
jq \
libicu-dev \
libzip-dev \
locales \
poppler-utils \
procps \
unzip \
# cron
&& mkdir -p /var/spool/cron/crontabs \
&& echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Install PHP extensions
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
&& install-php-extensions \
apcu \
bcmath \
bz2 \
exif \
gd \
gettext \
gmp \
imagick \
intl \
memcache \
memcached \
mysqli \
opcache \
pcntl \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
redis \
sockets \
sodium \
sysvsem \
xdebug \
zip \
@composer \
&& rm /usr/local/bin/install-php-extensions \
# pevent errors when try to create files at /var/www with user www-data
&& chown -R www-data /var/www
# Install NVM
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& export NVM_DIR="/root/.nvm" \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install 22 \
&& nvm alias default 22
COPY config/php/* /usr/local/etc/php/conf.d/
COPY scripts/* /var/www/scripts/
COPY bin/* /usr/local/bin/
VOLUME /var/www/html
WORKDIR /var/www/html
ENTRYPOINT [ "bash", "/var/www/scripts/entrypoint.sh" ]
CMD ["php-fpm"]