Spotter-VM/openmapkit/Dockerfile

27 lines
836 B
Docker
Raw Normal View History

2017-12-12 13:29:33 +01:00
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN apk --no-cache add python2
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 \
&& 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"]