forked from fivestones/docker-arm64v8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
85 lines (72 loc) · 2.46 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
FROM arm64v8/php:7.4-apache
#freetype patch
ADD https://git.archlinux.org/svntogit/packages.git/plain/trunk/freetype.patch?h=packages/php /tmp/freetype.patch
# add PHP, extensions and third-party software
RUN apt-get update \
&& apt-get install -y \
libapache2-mod-xsendfile \
libfreetype6-dev \
libjpeg62-turbo-dev \
libldap2-dev \
libxml2-dev \
libzip-dev \
libcurl4-gnutls-dev \
dcraw \
locales \
graphicsmagick \
ffmpeg \
default-mysql-client \
unzip \
cron \
# patch PHP freetype
&& docker-php-source extract; \
cd /usr/src/php; \
patch -p1 -i /tmp/freetype.patch; \
rm /tmp/freetype.patch \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure zip \
&& docker-php-ext-configure gd --enabled-gd --with-freetype \
# && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
&& docker-php-ext-install -j$(nproc) pdo_mysql exif zip gd opcache ldap
# set recommended PHP.ini settings
# see http://docs.filerun.com/php_configuration
COPY filerun-optimization.ini /usr/local/etc/php/conf.d/
# Install ionCube
RUN curl -O //downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz \
&& tar xvfz ioncube_loaders_lin_aarch64.tar.gz \
&& PHP_EXT_DIR=$(php-config --extension-dir) \
&& cp "ioncube/ioncube_loader_lin_7.4.so" $PHP_EXT_DIR \
&& echo "zend_extension=ioncube_loader_lin_7.4.so" >> /usr/local/etc/php/conf.d/00_ioncube_loader_lin_7.4.ini \
&& rm -rf ioncube ioncube_loaders_lin_aarch64.tar.gz
# Enable Apache XSendfile
RUN { \
echo 'XSendFile On'; \
echo; \
echo 'XSendFilePath /user-files'; \
} | tee "/etc/apache2/conf-available/filerun.conf" \
&& a2enconf filerun
# Download FileRun installation package
RUN curl -o /filerun.zip -L https://filerun.com/download-latest \
&& mkdir /user-files \
&& chown www-data:www-data /user-files
ENV FR_DB_HOST db
ENV FR_DB_PORT 3306
ENV FR_DB_NAME filerun
ENV FR_DB_USER filerun
ENV FR_DB_PASS filerun
ENV APACHE_RUN_USER user
ENV APACHE_RUN_USER_ID 1000
ENV APACHE_RUN_GROUP user
ENV APACHE_RUN_GROUP_ID 1000
COPY db.sql /filerun.setup.sql
COPY autoconfig.php /
VOLUME ["/var/www/html", "/user-files"]
COPY ./entrypoint.sh /
COPY ./wait-for-it.sh /
COPY ./import-db.sh /
RUN chmod +x /wait-for-it.sh
RUN chmod +x /import-db.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]