forked from orangehrm/orangehrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
85 lines (79 loc) · 2.38 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
FROM php:7.3.15-apache-buster
LABEL maintainer="samanthaj@orangehrm.com"
ENV OHRM_VERSION 4.8
ENV OHRM_MD5 55c9a4657334ad6051f009a8a41fad02
ENV IONCUBE_MD5 1e6b0d8a8db6c5536c99bd7e67eb6a4f
ENV IONCUBE_VER '10.4.4'
RUN set -ex; \
curl -fSL -o ioncube.tar.gz "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${IONCUBE_VER}.tar.gz"; \
echo "${IONCUBE_MD5} ioncube.tar.gz" | md5sum -c -; \
tar -xvvzf ioncube.tar.gz; \
mv ioncube/ioncube_loader_lin_7.3.so `php-config --extension-dir`; \
rm -rf ioncube.tar.gz ioncube; \
docker-php-ext-enable ioncube_loader_lin_7.3
RUN set -ex; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libzip-dev \
libldap2-dev \
unzip \
; \
\
cd .. && rm -r html; \
curl -fSL -o orangehrm.zip "https://sourceforge.net/projects/orangehrm/files/stable/${OHRM_VERSION}/orangehrm-${OHRM_VERSION}.zip"; \
echo "${OHRM_MD5} orangehrm.zip" | md5sum -c -; \
unzip -q orangehrm.zip "orangehrm-${OHRM_VERSION}/*"; \
mv orangehrm-$OHRM_VERSION html; \
rm -rf orangehrm.zip; \
chown www-data:www-data html; \
chown -R www-data:www-data html/symfony/cache html/symfony/log; \
chmod -R 775 html/symfony/cache html/symfony/log; \
\
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
; \
docker-php-ext-configure ldap \
--with-libdir=lib/x86_64-linux-gnu/ \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
mysqli \
pdo_mysql \
zip \
ldap \
; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/cache/apt/archives; \
rm -rf /var/lib/apt/lists/*
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
fi;
VOLUME ["/var/www/html"]