forked from bheisig/i-doit-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (66 loc) · 1.99 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
FROM php:7.4-apache-bullseye
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
RUN apt-get update; \
apt-get full-upgrade -y; \
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libevent-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
mariadb-client \
unzip \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure ldap \
--with-libdir="lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-install \
bcmath \
gd \
ldap \
mysqli \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
sockets \
zip \
; \
pecl install APCu; \
pecl install memcached; \
docker-php-ext-enable \
apcu \
memcached
COPY php.ini /usr/local/etc/php/conf.d/99-i-doit.ini
COPY vhost.conf /etc/apache2/sites-available/i-doit.conf
COPY entrypoint.sh is-installed.sh setup.sh /usr/local/bin/
COPY CHECKSUMS /var/www/html
WORKDIR /var/www/html
ARG IDOIT_VERSION=1.19
ARG IDOIT_ZIP_FILE=idoit-${IDOIT_VERSION}.zip
ARG IDOIT_DOWNLOAD_URL=https://login.i-doit.com/downloads/${IDOIT_ZIP_FILE}
RUN curl -fsSLO "${IDOIT_DOWNLOAD_URL}"; \
sha256sum --strict --ignore-missing --check CHECKSUMS; \
unzip -q "${IDOIT_ZIP_FILE}"; \
rm "${IDOIT_ZIP_FILE}"; \
rm CHECKSUMS; \
chown www-data:www-data -R .; \
find . -type d -name \* -exec chmod 775 {} \;; \
find . -type f -exec chmod 664 {} \;; \
chmod 774 ./*.sh setup/*.sh; \
cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
a2dissite 000-default; \
a2ensite i-doit; \
a2enmod rewrite
VOLUME /var/www/html
ENTRYPOINT ["entrypoint.sh"]
CMD ["apache2-foreground"]