-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
45 lines (38 loc) · 1.61 KB
/
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
45
FROM ubuntu:22.04
ARG PHP_VERSION='8.2'
LABEL maintainer="Chris Fidao ([email protected])"
ENV DEBIAN_FRONTEND=noninteractive \
COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/composer \
COMPOSER_MAX_PARALLEL_HTTP=24 \
PHP_PM_MAX_CHILDREN=10 \
PHP_PM_START_SERVERS=3 \
PHP_MIN_SPARE_SERVERS=2 \
PHP_MAX_SPARE_SERVERS=4 \
PHP_DATE_TIMEZONE=UTC \
PHP_DISPLAY_ERRORS=Off \
PHP_ERROR_REPORTING=22527 \
PHP_MEMORY_LIMIT=256M \
PHP_MAX_EXECUTION_TIME=90 \
PHP_POST_MAX_SIZE=100M \
PHP_UPLOAD_MAX_FILE_SIZE=100M
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY php/ondrej_ubuntu_php.gpg /etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg
ADD php/packages/${PHP_VERSION}.txt /tmp/php-packages.txt
RUN apt-get update \
&& apt-get install -y --no-install-recommends gnupg2 ca-certificates git-core curl zip unzip \
rsync sqlite3 nginx supervisor cron \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-ubuntu-php-focal.list \
&& apt-get update \
&& apt-get -y --no-install-recommends install $(cat /tmp/php-packages.txt) \
&& ln -sf /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm \
&& mkdir -p /var/www/html/public && echo "<?php phpinfo();" > /var/www/html/public/index.php \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
COPY nginx/ /etc/nginx/
COPY fpm/ /etc/php/${PHP_VERSION}/fpm/
COPY supervisor/ /etc/supervisor/
COPY entrypoint.sh /entrypoint
WORKDIR /var/www/html
EXPOSE 80
ENTRYPOINT ["/entrypoint"]