forked from tuxgasy/docker-dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
44 lines (33 loc) · 1.12 KB
/
Dockerfile.template
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
FROM php:%PHP_VERSION%
MAINTAINER Garcia MICHEL <garcia@soamichel.fr>
ENV DOLI_VERSION %VERSION%
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_DB_HOST mysql
ENV DOLI_DB_USER doli
ENV DOLI_DB_PASSWORD doli_pass
ENV DOLI_DB_NAME dolidb
ENV DOLI_ADMIN_LOGIN admin
ENV DOLI_ADMON_PASSWORD admin
ENV DOLI_URL_ROOT 'http://localhost'
ENV WWW_USER_ID 33
ENV WWW_GROUP_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC'
RUN apt-get update -q && apt-get upgrade -yq \
&& apt-get install -yq \
libpng12-dev \
libjpeg-dev \
libxml2-dev \
mysql-client \
unzip \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install mysqli pdo pdo_mysql gd soap zip
# Get Dolibarr
ADD https://github.com/Dolibarr/dolibarr/archive/${DOLI_VERSION}.zip /tmp/dolibarr.zip
RUN unzip -q /tmp/dolibarr.zip -d /tmp/dolibarr
RUN cp -r /tmp/dolibarr/dolibarr-${DOLI_VERSION}/htdocs/* /var/www/html/ && ln -s /var/www/html /var/www/htdocs
RUN cp -r /tmp/dolibarr/dolibarr-${DOLI_VERSION}/scripts /var/www/
RUN rm -rf /tmp/dolibarr
EXPOSE 80
COPY docker-run.sh /usr/local/bin/
ENTRYPOINT ["docker-run.sh"]