2017-12-12 13:29:33 +01:00
|
|
|
FROM alpine:3.7
|
|
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
|
|
|
|
RUN apk --no-cache add python2
|
|
|
|
|
2017-12-16 20:40:06 +01:00
|
|
|
RUN apk --no-cache add --virtual .deps git build-base py2-pip \
|
|
|
|
&& apk add nodejs git openjdk8-jre-base \
|
2017-12-13 17:16:08 +01:00
|
|
|
&& git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/openmapkit \
|
|
|
|
&& cd /srv/openmapkit \
|
2017-12-12 13:29:33 +01:00
|
|
|
&& git submodule update --init \
|
|
|
|
&& pip install -r requirements.txt \
|
|
|
|
&& npm install -g yarn \
|
|
|
|
&& npm install libxmljs \
|
|
|
|
&& yarn \
|
2017-12-13 17:16:08 +01:00
|
|
|
&& addgroup -S -g 8007 omk \
|
|
|
|
&& adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \
|
2017-12-16 20:40:06 +01:00
|
|
|
&& apk --no-cache del .deps \
|
2017-12-13 17:16:08 +01:00
|
|
|
&& rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \
|
2017-12-12 13:29:33 +01:00
|
|
|
&& rm -rf /root/* || true
|
|
|
|
|
2017-12-13 17:16:08 +01:00
|
|
|
VOLUME ["/srv/openmapkit/data"]
|
|
|
|
EXPOSE 8007
|
2017-12-12 13:29:33 +01:00
|
|
|
|
|
|
|
USER omk
|
|
|
|
ENV NODE_ENV production
|
2017-12-13 17:16:08 +01:00
|
|
|
CMD ["node", "/srv/openmapkit/server.js"]
|