Spotter-VM/lxc-apps/frontlinesms/lxcfile

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-09-18 11:29:58 +02:00
IMAGE frontlinesms_2.6.5-190620
2019-09-18 11:29:58 +02:00
LAYER alpine3.9_3.9.4-190620
LAYER alpine3.9-java8_8.212.04-190620
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
addgroup -S -g 8018 sms
adduser -S -u 8018 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms
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
COPY lxc
RUN EOF
# Install Czech translation
cd /srv/frontlinesms/frontlinesms2/web-app/assets/i18n
gzip <frontlinesms-core_messages_cs.js >frontlinesms-core_messages_cs.js.gz
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
chown 8018:8018 frontlinesms-core_messages_cs*
EOF
2018-09-14 18:13:11 +02:00
MOUNT DIR /srv/frontlinesms/data srv/frontlinesms/.frontlinesms2
2018-09-13 13:05:39 +02:00
2018-09-13 16:21:16 +02:00
CMD s6-svscan /etc/services.d