-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
94 lines (88 loc) · 3.12 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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Use the base image
FROM gaibz/ubuntu20-php7.4-nginx:latest
# Set label
LABEL maintainer="mrizkihidayat66"
# Set non-interactive mode for apt-get
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
unzip \
build-essential && \
\
echo "**** install runtime packages ****" && \
apt-get install -y --no-install-recommends \
ffmpeg \
pkg-config \
libmagickwand-dev \
mariadb-client \
php-dev \
php7.4 \
php7.4-common \
php7.4-curl \
php7.4-gd \
php7.4-json \
php7.4-mbstring \
php7.4-opcache \
php7.4-mysql \
php7.4-xml \
php7.4-zip && \
\
echo "**** install imagick ****" && \
curl -o /tmp/imagick-3.4.4.tgz -L http://pecl.php.net/get/imagick-3.4.4.tgz && \
tar xvzf /tmp/imagick-3.4.4.tgz -C /tmp && \
cd /tmp/imagick-3.4.4 && \
phpize && \
./configure && \
make install && \
echo "extension=imagick.so" >> /etc/php/7.4/cli/php.ini && \
echo "" >> /etc/php/7.4/fpm/php.ini && \
echo "extension=imagick.so" >> /etc/php/7.4/fpm/php.ini && \
cd / && \
\
echo "**** install ioncube ****" && \
curl -o /tmp/ioncube_loaders_lin_x86-64.tar.gz -L http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && \
tar xvfz /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp && \
cp "/tmp/ioncube/ioncube_loader_lin_7.4.so" /usr/lib/php/20190902/ && \
echo "zend_extension=ioncube_loader_lin_7.4.so" >> /etc/php/7.4/fpm/conf.d/00_ioncube_loader_lin_7.4.ini && \
\
echo "**** install filerun ****" && \
mkdir -p /var/www/html && \
curl -o /tmp/filerun.zip -L "https://www.dropbox.com/scl/fi/ds38ohliifpyrq3y4tilg/FileRun_20220519_PHP73-74.zip?rlkey=29zbw32y1ul3bvq77jk8qvk8l&st=z5bk3s0e&dl=1" && \
unzip /tmp/filerun.zip -d /var/www/html && \
\
echo "**** cleanup ****" && \
apt-get purge -y --auto-remove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /root/.cache /tmp/*
# Ports and volumes
VOLUME /html
VOLUME /config
VOLUME /user-files
# Copy local files
COPY default /etc/nginx/sites-available/
COPY filerun-optimization.ini /etc/php/7.4/fpm/conf.d/
RUN \
mkdir -p /html \
/config \
/user-files \
/config/keys && \
rm -f /etc/nginx/sites-enabled/default.conf && \
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default.conf && \
ln -s /config/config.php /var/www/html/system/data/autoconfig.php && \
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /config/keys/cert.key -out /config/keys/cert.crt \
-subj "/C=US/ST=State/L=City/O=Organization/OU=Department/CN=example.com/[email protected]" && \
chown -R www-data:www-data \
/var/www/html \
/html \
/config \
/user-files \
/config/keys/cert.crt \
/config/keys/cert.key && \
chmod 644 /config/keys/cert.crt \
/config/keys/cert.key