-
Notifications
You must be signed in to change notification settings - Fork 0
/
dolibarr.dockerfile
77 lines (63 loc) · 2.14 KB
/
dolibarr.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
FROM php:7.4-apache-bullseye
LABEL maintainer="Me"
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_DB_HOST pgsql
ENV DOLI_DB_HOST_PORT 5432
ENV DOLI_DB_NAME dolibarrdb
ENV DOLI_URL_ROOT 'http://localhost'
ENV DOLI_NOCSRFCHECK 0
ENV DOLI_AUTH dolibarr
ENV DOLI_LDAP_HOST 127.0.0.1
ENV DOLI_LDAP_PORT 389
ENV DOLI_LDAP_VERSION 3
ENV DOLI_LDAP_SERVER_TYPE openldap
ENV DOLI_LDAP_LOGIN_ATTRIBUTE uid
ENV DOLI_LDAP_DN 'ou=users,dc=my-domain,dc=com'
ENV DOLI_LDAP_FILTER ''
ENV DOLI_LDAP_BIND_DN ''
ENV DOLI_LDAP_BIND_PASS ''
ENV DOLI_LDAP_DEBUG false
ENV WWW_USER_ID 33
ENV WWW_GROUP_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M
RUN apt-get update -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
libc-client-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libkrb5-dev \
libldap2-dev \
libpng-dev \
libxml2-dev \
libzip-dev \
default-mysql-client \
postgresql-client \
libpq-dev \
&& apt-get autoremove -y \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) calendar intl pgsql pdo_pgsql mysqli pdo_mysql gd soap zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini
ENV DOLI_VERSION 14.0.5
# Get Dolibarr
RUN curl -fLSs https://github.com/Dolibarr/dolibarr/archive/${DOLI_VERSION}.tar.gz |\
tar -C /tmp -xz && \
cp -r /tmp/dolibarr-${DOLI_VERSION}/htdocs/* /var/www/html/ && \
ln -s /var/www/html /var/www/htdocs && \
cp -r /tmp/dolibarr-${DOLI_VERSION}/scripts /var/www/ && \
rm -rf /tmp/* && \
mkdir -p /var/www/documents && \
mkdir -p /var/www/html/custom && \
chown -R www-data:www-data /var/www
RUN rm -rf /var/lib/apt/lists/*
EXPOSE 8899
VOLUME /var/www/documents
VOLUME /var/www/html/custom
COPY dolibarr-docker-run.sh /usr/local/bin/
ENTRYPOINT ["dolibarr-docker-run.sh"]
CMD ["apache2-foreground"]