2018-03-30 21:58:44 +02:00
|
|
|
FROM java
|
|
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add openjdk8-jre s6 ttf-dejavu xf86-video-dummy xorg-server \
|
|
|
|
# Create OS user
|
2018-04-21 22:43:57 +02:00
|
|
|
&& addgroup -S -g 8018 sms \
|
|
|
|
&& adduser -S -u 8018 -h /srv/frontlinesms -s /bin/sh -g sms -G sms sms \
|
2018-03-30 21:58:44 +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 \
|
2018-04-21 22:43:57 +02:00
|
|
|
&& 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' \
|
2018-03-30 21:58:44 +02:00
|
|
|
# Replace Jetty port
|
2018-04-21 22:43:57 +02:00
|
|
|
&& sed -i 's/8130/8080/' /srv/frontlinesms/frontlinesms2/launcher.properties \
|
2018-03-30 21:58:44 +02:00
|
|
|
# Cleanup
|
|
|
|
&& rm /tmp/frontlinesms2.sh
|
|
|
|
|
|
|
|
COPY docker/ /
|
|
|
|
|
2018-04-21 22:43:57 +02:00
|
|
|
VOLUME ["/srv/frontlinesms/.frontlinesms2"]
|
2018-03-30 21:58:44 +02:00
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD ["s6-svscan", "/etc/services.d"]
|