forked from phelset/docker-osticket
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Dockerfile
76 lines (75 loc) · 2.89 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
# Deployment doesn't work on Alpine
FROM php:7.3-cli AS deployer
ENV OSTICKET_VERSION=1.14.3
RUN set -x \
&& apt-get update \
&& apt-get install -y git-core \
&& git clone -b v${OSTICKET_VERSION} --depth 1 https://github.com/osTicket/osTicket.git \
&& cd osTicket \
&& php manage.php deploy -sv /data/upload \
# www-data is uid:gid 82:82 in php:7.0-fpm-alpine
&& chown -R 82:82 /data/upload \
# Hide setup
&& mv /data/upload/setup /data/upload/setup_hidden \
&& chown -R root:root /data/upload/setup_hidden \
&& chmod -R go= /data/upload/setup_hidden
FROM php:7.3-fpm-alpine
MAINTAINER Martin Campbell <[email protected]>
# environment for osticket
ENV HOME=/data
# setup workdir
WORKDIR /data
COPY --from=deployer /data/upload upload
RUN set -x && \
# requirements and PHP extensions
apk add --no-cache --update \
wget \
msmtp \
ca-certificates \
supervisor \
nginx \
libpng \
c-client \
openldap \
libintl \
libxml2 \
icu \
openssl && \
apk add --no-cache --virtual .build-deps \
imap-dev \
libpng-dev \
curl-dev \
openldap-dev \
gettext-dev \
libxml2-dev \
icu-dev \
autoconf \
g++ \
make \
pcre-dev && \
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 .build-deps && \
rm -rf /var/cache/apk/* && \
# Download languages packs
wget -nv -O upload/include/i18n/fr.phar https://s3.amazonaws.com/downloads.osticket.com/lang/fr.phar && \
wget -nv -O upload/include/i18n/ar.phar https://s3.amazonaws.com/downloads.osticket.com/lang/ar.phar && \
wget -nv -O upload/include/i18n/pt_BR.phar https://s3.amazonaws.com/downloads.osticket.com/lang/pt_BR.phar && \
wget -nv -O upload/include/i18n/it.phar https://s3.amazonaws.com/downloads.osticket.com/lang/it.phar && \
wget -nv -O upload/include/i18n/es_ES.phar https://s3.amazonaws.com/downloads.osticket.com/lang/es_ES.phar && \
wget -nv -O upload/include/i18n/de.phar https://s3.amazonaws.com/downloads.osticket.com/lang/de.phar && \
mv upload/include/i18n upload/include/i18n.dist && \
# Download LDAP plugin
wget -nv -O upload/include/plugins/auth-ldap.phar https://s3.amazonaws.com/downloads.osticket.com/plugin/auth-ldap.phar && \
# Create msmtp log
touch /var/log/msmtp.log && \
chown www-data:www-data /var/log/msmtp.log && \
# File upload permissions
mkdir -p /var/tmp/nginx && \
chown nginx:www-data /var/tmp/nginx && chmod g+rx /var/tmp/nginx
COPY files/ /
VOLUME ["/data/upload/include/plugins","/data/upload/include/i18n","/var/log/nginx"]
EXPOSE 80
CMD ["/data/bin/start.sh"]