1FROM ubuntu:18.04
2MAINTAINER
[email protected]
3WORKDIR /server
4
5ENV
DEBIAN_FRONTEND=noninteractive
6
7RUN
apt-get update
\
8 && apt-get install -y software-properties-common rsyslog pkg-config ssmtp
git pkg-config libbson-1.0 libmongoc-1.0-0 php-pear
\
9 && add-apt-repository
-y ppa:ondrej/php
\
10 && apt-get update
\
11 && apt-get -y install -y php8.0-cli php8.0-fpm php8.0-common php8.0-curl php8.0-opcache php8.0-readline php8.0-dev php8.0-ldap php8.0-xml php8.0-bcmath php8.0-mbstring
\
12 && apt-get clean
\
13 && rm -rf /var/lib/apt/lists/*
14
15
16
17RUN
apt-get update
&& \
18 apt-get install -y php-pear
19
20
21
22RUN
apt-get update
&& \
23 apt-get install -y zip unzip php8.0-zip
24
25RUN pecl
install mongodb
\
26 && echo "extension=mongodb.so" | tee /etc/php/8.0/fpm/conf.d/20-mongodb.ini
\
27 && echo "extension=mongodb.so" | tee /etc/php/8.0/cli/conf.d/20-mongodb.ini
28
29RUN
git clone
-b v1.2.0
--depth=1 "https://github.com/jbboehr/php-psr.git" \
30 && cd php-psr
\
31 && phpize
\
32 && ./configure
\
33 && make \
34 && make test \
35 && make install \
36 && echo "extension=psr.so" | tee /etc/php/8.0/fpm/conf.d/20-psr.ini
\
37 && echo "extension=psr.so" | tee /etc/php/8.0/cli/conf.d/20-psr.ini
\
38 && cd -
39
40RUN
git clone
-b v5.0.0beta3
--depth=1 "https://github.com/phalcon/cphalcon.git" \
41 && cd cphalcon/build
\
42 && ./install
\
43 && echo "extension=phalcon.so" | tee /etc/php/8.0/fpm/conf.d/30-phalcon.ini
\
44 && echo "extension=phalcon.so" | tee /etc/php/8.0/cli/conf.d/30-phalcon.ini
45
46RUN
rm /etc/php/8.0/fpm/php.ini
\
47 && rm /etc/php/8.0/fpm/php-fpm.conf
\
48 && mkdir -p /server/conf/php8/
\
49 && touch /server/conf/php8/php-fpm.conf
\
50 && touch /server/conf/php8/php.ini
\
51 && ln -s /server/conf/php8/php-fpm.conf /etc/php/8.0/fpm/php-fpm.conf
\
52 && ln -s /server/conf/php8/php.ini /etc/php/8.0/fpm/php.ini
53
54RUN
sed -i 's/mailhub=mail/mailhub=postfix/g' '/etc/ssmtp/ssmtp.conf' \
55 && sed -i 's/#FromLineOverride=YES/FromLineOverride=YES/g' '/etc/ssmtp/ssmtp.conf'
56
57COPY docker-entrypoint.sh /usr/local/bin/
58ENTRYPOINT
["docker-entrypoint.sh"]
59
60EXPOSE
9008
61
62CMD
["php-fpm8.0",
"--nodaemonize"]