2020-04-04 00:17:24 +02:00
|
|
|
IMAGE frontlinesms_2.6.5-200403
|
|
|
|
FROM alpine3.8-java8_8.222.10-200403
|
2020-03-22 12:17:13 +01:00
|
|
|
# HTTP connection accept fails on Java 8.242
|
2018-09-13 13:05:39 +02:00
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add openjdk8-jre ttf-opensans xf86-video-dummy xorg-server
|
|
|
|
|
|
|
|
# Create OS user
|
2019-10-14 07:59:06 +02:00
|
|
|
addgroup -S -g 8080 sms
|
|
|
|
adduser -S -u 8080 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms
|
2018-09-18 16:27:42 +02:00
|
|
|
adduser sms dialout
|
2018-09-13 13:05:39 +02:00
|
|
|
|
|
|
|
# Install FrontlineSMS
|
|
|
|
wget http://download-frontlinesms.s3.amazonaws.com/frontlinesms2_unix_2.6.5.sh -O /tmp/frontlinesms2.sh
|
|
|
|
|
|
|
|
# Hackfix for Busybox gunzip
|
|
|
|
sed -i 's/gunzip -V/echo/' /tmp/frontlinesms2.sh
|
|
|
|
echo -e 'o\n\nn\nSpotter\nSpotter\n11\n45\n\n\nadmin@example.com\n\n\n\n\n\n\n\n\n\n\n' | su - sms -c 'sh /tmp/frontlinesms2.sh -c'
|
|
|
|
|
|
|
|
# Replace Jetty port
|
|
|
|
sed -i 's/8130/8080/' /srv/frontlinesms/frontlinesms2/launcher.properties
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
rm /tmp/frontlinesms2.sh
|
|
|
|
EOF
|
|
|
|
|
2020-03-17 10:53:26 +01:00
|
|
|
COPY image.d
|
2018-09-13 13:05:39 +02:00
|
|
|
|
2018-12-07 16:51:48 +01:00
|
|
|
RUN EOF
|
|
|
|
# Install Czech translation
|
|
|
|
cd /srv/frontlinesms/frontlinesms2/web-app/assets/i18n
|
2018-12-10 09:31:18 +01:00
|
|
|
gzip <frontlinesms-core_messages_cs.js >frontlinesms-core_messages_cs.js.gz
|
2018-12-07 16:51:48 +01:00
|
|
|
MD5=$(md5sum frontlinesms-core_messages_cs.js | cut -d' ' -f1)
|
|
|
|
cp frontlinesms-core_messages_cs.js frontlinesms-core_messages_cs-${MD5}.js
|
|
|
|
cp frontlinesms-core_messages_cs.js.gz frontlinesms-core_messages_cs-${MD5}.js.gz
|
2019-10-14 07:59:06 +02:00
|
|
|
chown 8080:8080 frontlinesms-core_messages_cs*
|
2018-12-07 16:51:48 +01:00
|
|
|
EOF
|
|
|
|
|
2020-02-09 15:54:46 +01:00
|
|
|
CMD /bin/s6-svscan /etc/services.d
|