forked from devinsolutions/docker-osticket
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
115 lines (115 loc) · 3.73 KB
/
Dockerfile
File metadata and controls
115 lines (115 loc) · 3.73 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
FROM php:7.4-fpm-alpine3.13
RUN set -ex; \
\
export CFLAGS="-Os"; \
export CPPFLAGS="${CFLAGS}"; \
export LDFLAGS="-Wl,--strip-all"; \
\
# Runtime dependencies
apk add --no-cache \
c-client \
icu \
libintl \
libpng \
libzip \
msmtp \
nginx \
openldap \
runit \
; \
\
# Build dependencies
apk add --no-cache --virtual .build-deps \
${PHPIZE_DEPS} \
gettext-dev \
icu-dev \
imap-dev \
libpng-dev \
libzip-dev \
openldap-dev \
; \
\
# Install PHP extensions
docker-php-ext-configure imap --with-imap-ssl; \
docker-php-ext-install -j "$(nproc)" \
gd \
gettext \
imap \
intl \
ldap \
mysqli \
sockets \
zip \
; \
pecl install apcu; \
docker-php-ext-enable \
apcu \
opcache \
; \
\
# Create msmtp log
touch /var/log/msmtp.log; \
chown www-data:www-data /var/log/msmtp.log; \
\
# Create data dir
mkdir /var/lib/osticket; \
chown www-data:www-data /var/lib/osticket; \
\
# Clean up
apk del .build-deps; \
rm -rf /tmp/pear /var/cache/apk/*
# DO NOT FORGET TO UPDATE "tags" FILE
ENV OSTICKET_VERSION=1.15.4 \
OSTICKET_SHA256SUM=6c7cf5fe74258dd0beac6176c438468f468a0a3f07f1f6a0349cc68a9e514302
RUN set -ex; \
\
wget -q -O osTicket.zip https://github.com/osTicket/osTicket/releases/download/\
v${OSTICKET_VERSION}/osTicket-v${OSTICKET_VERSION}.zip; \
echo "${OSTICKET_SHA256SUM} osTicket.zip" | sha256sum -c; \
unzip osTicket.zip 'upload/*'; \
rm osTicket.zip; \
mkdir -p /usr/local/src; \
mv upload /usr/local/src/osticket; \
# Hard link the sources to the public directory
cp -al /usr/local/src/osticket/. /var/www/html; \
#cp -as /usr/local/src/osticket/. /var/www/html; \
# Hide setup
rm -r /var/www/html/setup; \
\
for lang in ar az bg ca cs da de el es_ES et fr hr hu it ja ko lt mk mn nl no fa pl pt_PT \
pt_BR sk sl sr_CS fi sv_SE ro ru vi th tr uk zh_CN zh_TW; do \
wget -q -O /var/www/html/include/i18n/${lang}.phar \
https://s3.amazonaws.com/downloads.osticket.com/lang/${lang}.phar; \
done
#ENV OSTICKET_PLUGINS_VERSION=93d7d6d11670c7eac7a4e432dbc15f40375a70cf \
# OSTICKET_PLUGINS_SHA256SUM=0d4b60045be607d377a7d27a3d5143d5db36041f992c8924816604a81bb342d6
#RUN set -ex; \
# \
# wget -q -O osTicket-plugins.tar.gz https://github.com/devinsolutions/osTicket-plugins/archive/\
#${OSTICKET_PLUGINS_VERSION}.tar.gz; \
# echo "${OSTICKET_PLUGINS_SHA256SUM} osTicket-plugins.tar.gz" | sha256sum -c; \
# tar -xzf osTicket-plugins.tar.gz --one-top-level --strip-components 1; \
# rm osTicket-plugins.tar.gz; \
# \
# cd osTicket-plugins; \
# php make.php hydrate; \
# find * -maxdepth 0 -type d ! -path doc ! -path lib -exec mv '{}' \
# /var/www/html/include/plugins +; \
# cd ..; \
# \
# rm -r osTicket-plugins /root/.composer
ENV OSTICKET_SLACK_VERSION=cd98e54fcadf1a5dd8e78b0a0380561c7ef29b02 \
OSTICKET_SLACK_SHA256SUM=9cdead701fd1be91a64451dfaca98148b997dc4e5a0ff1a61965bffeebd65540
RUN set -ex; \
\
wget -q -O osTicket-slack-plugin.tar.gz https://github.com/devinsolutions/\
osTicket-slack-plugin/archive/${OSTICKET_SLACK_VERSION}.tar.gz; \
echo "${OSTICKET_SLACK_SHA256SUM} osTicket-slack-plugin.tar.gz" | sha256sum -c; \
tar -xzf osTicket-slack-plugin.tar.gz -C /var/www/html/include/plugins --strip-components 1 \
osTicket-slack-plugin-${OSTICKET_SLACK_VERSION}/slack; \
rm osTicket-slack-plugin.tar.gz
COPY root /
CMD ["start"]
STOPSIGNAL SIGTERM
EXPOSE 80
HEALTHCHECK CMD curl -fIsS http://localhost/ || exit 1