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-13 10:17:58 +01:00
|
|
|
RUN apk --no-cache add nodejs git build-base openjdk8-jre-base py2-pip \
|
2017-12-12 13:29:33 +01:00
|
|
|
&& git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/omk \
|
|
|
|
&& cd /srv/omk \
|
|
|
|
&& git submodule update --init \
|
|
|
|
&& pip install -r requirements.txt \
|
|
|
|
&& npm install -g yarn \
|
|
|
|
&& npm install libxmljs \
|
|
|
|
&& yarn \
|
|
|
|
&& addgroup -S omk \
|
|
|
|
&& adduser -S -h /srv/omk -H -s /bin/sh -g omk -G omk omk \
|
|
|
|
&& chown -R omk:omk /srv/omk/data/deployments /srv/omk/data/submissions \
|
2017-12-13 10:17:58 +01:00
|
|
|
&& apk --no-cache del git build-base py2-pip \
|
2017-12-12 13:29:33 +01:00
|
|
|
&& rm -rf /srv/omk/.git* /srv/omk/api/odk/pyxform/.git* \
|
|
|
|
&& rm -rf /root/* || true
|
|
|
|
|
|
|
|
VOLUME ["/srv/omk/data"]
|
|
|
|
EXPOSE 3210
|
|
|
|
|
|
|
|
USER omk
|
|
|
|
ENV NODE_ENV production
|
|
|
|
CMD ["node", "/srv/omk/server.js"]
|