-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (46 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
55 lines (46 loc) · 1.17 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
FROM php:8.3-fpm-alpine
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
libzip-dev \
oniguruma-dev \
libxml2-dev \
unzip \
curl; \
apk add --no-cache \
libpng \
libjpeg-turbo \
freetype \
libzip \
oniguruma; \
\
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install -j"$(nproc)" \
pdo_mysql \
mbstring \
exif \
pcntl \
zip \
gd \
bcmath; \
\
curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer; \
\
mkdir -p /var/run/php; \
chown -R www-data:www-data /var/run/php; \
sed -i 's#;pid = run/php-fpm.pid#pid = /var/run/php/php-fpm.pid#' \
/usr/local/etc/php-fpm.conf; \
\
apk del .build-deps
WORKDIR /var/www/html
COPY . /var/www/html
RUN composer install --no-dev --no-interaction --no-progress --no-suggest --optimize-autoloader
EXPOSE 9000
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]