-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (53 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
64 lines (53 loc) · 1.75 KB
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
## Vtiger CRM %%VERSION%%
FROM php:5.6.30-apache
LABEL maintainer='Francesco Bianco <info@javanile.org>'
WORKDIR /var/www/html
## Variables
ENV VT_VERSION=%%VERSION%%
ENV VT_DOWNLOAD=%%DOWNLOAD%%
ENV MYSQL_HOST=mysql
ENV MYSQL_DATABASE=vtigercrm
RUN apt-get update \
&& apt-get install --no-install-recommends -y zlib1g-dev libc-client-dev libkrb5-dev cron rsyslog \
&& docker-php-ext-install zip \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& docker-php-ext-install mysql mysqli pdo pdo_mysql \
&& usermod -u 1000 www-data \
&& groupmod -g 1000 www-data \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf \
&& mkdir /etc/apache2/ssl \
&& curl -o vt.tar.gz -SL "${VT_DOWNLOAD}" \
&& tar -xzf vt.tar.gz \
&& rm vt.tar.gz \
&& chmod -R 775 vtigercrm \
&& chown -R www-data:www-data vtigercrm \
&& apt-get clean \
&& rm -rf /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /etc/cron.*
COPY php.ini /usr/local/etc/php/php.ini
COPY crontab /etc/cron.d/crontab
## Apache
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ssl/localhost.crt /etc/apache2/ssl/localhost.crt
COPY ssl/localhost.pem /etc/apache2/ssl/localhost.pem
RUN a2enmod rewrite && a2enmod ssl
## Install
COPY install-mysql.sh install-mysql.sh
RUN ./install-mysql.sh
RUN composer require guzzlehttp/guzzle
COPY install-vtiger.php install-vtiger.php
COPY install-vtiger.sh install-vtiger.sh
RUN ./install-vtiger.sh
## Cleanup
COPY cleanup.sh cleanup.sh
RUN ./cleanup.sh && rm cleanup.sh
## Commands
COPY extends /usr/local/bin/
## Configs
COPY config.inc.php /var/www/html/vtigercrm
## Running
COPY foreground.sh /usr/local/bin/
COPY foreground-check.php foreground-check.php
CMD ["foreground.sh"]