forked from CampbellSoftwareSolutions/docker-osticket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
75 lines (65 loc) · 3 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
FROM php:7.0-fpm-alpine
MAINTAINER Martin Campbell <[email protected]>
# setup workdir
RUN mkdir /data
WORKDIR /data
# environment for osticket
ENV OSTICKET_VERSION 1.10
ENV HOME /data
# requirements and PHP extensions
RUN apk add --update \
wget \
unzip \
msmtp \
ca-certificates \
supervisor \
nginx \
libpng \
c-client \
openldap \
libintl \
libxml2 \
icu \
openssl && \
apk add imap-dev libpng-dev curl-dev openldap-dev gettext-dev libxml2-dev icu-dev autoconf g++ make && \
docker-php-ext-install gd curl ldap mysqli sockets gettext mbstring xml intl opcache && \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install imap && \
pecl install apcu && docker-php-ext-enable apcu && \
apk del imap-dev libpng-dev curl-dev openldap-dev gettext-dev libxml2-dev icu-dev autoconf g++ make && \
rm -rf /var/cache/apk/*
# Download & install OSTicket
RUN wget -nv -O osTicket.zip http://osticket.com/sites/default/files/download/osTicket-v${OSTICKET_VERSION}.zip && \
unzip osTicket.zip && \
rm osTicket.zip && \
chown -R www-data:www-data /data/upload/ && \
chmod -R a+rX /data/upload/ /data/scripts/ && \
chmod -R u+rw /data/upload/ /data/scripts/ && \
mv /data/upload/setup /data/upload/setup_hidden && \
chown -R root:root /data/upload/setup_hidden && \
chmod 700 /data/upload/setup_hidden
# Download languages packs
RUN wget -nv -O upload/include/i18n/fr.phar http://osticket.com/sites/default/files/download/lang/fr.phar && \
wget -nv -O upload/include/i18n/ar.phar http://osticket.com/sites/default/files/download/lang/ar.phar && \
wget -nv -O upload/include/i18n/pt_BR.phar http://osticket.com/sites/default/files/download/lang/pt_BR.phar && \
wget -nv -O upload/include/i18n/it.phar http://osticket.com/sites/default/files/download/lang/it.phar && \
wget -nv -O upload/include/i18n/es_ES.phar http://osticket.com/sites/default/files/download/lang/es_ES.phar && \
wget -nv -O upload/include/i18n/de.phar http://osticket.com/sites/default/files/download/lang/de.phar && \
wget -nv -O upload/include/i18n/ru.phar http://osticket.com/sites/default/files/download/lang/ru.phar && \
mv upload/include/i18n upload/include/i18n.dist
# Download LDAP plugin
RUN wget -nv -O upload/include/plugins/auth-ldap.phar http://osticket.com/sites/default/files/download/plugin/auth-ldap.phar
# Download storage-fs plugin
RUN wget -nv -O upload/include/plugins/storage-fs.phar http://osticket.com/sites/default/files/download/plugin/storage-fs.phar
# Configure nginx, PHP, msmtp and supervisor
COPY nginx.conf /etc/nginx/nginx.conf
COPY php-osticket.ini $PHP_INI_DIR/conf.d/
RUN touch /var/log/msmtp.log && \
chown www-data:www-data /var/log/msmtp.log
COPY supervisord.conf /data/supervisord.conf
COPY msmtp.conf /data/msmtp.conf
COPY php.ini $PHP_INI_DIR/php.ini
COPY bin/ /data/bin
VOLUME ["/data/upload/include/plugins","/data/upload/include/i18n","/var/log/nginx"]
EXPOSE 80
CMD ["/data/bin/start.sh"]