Spotter-VM/openmapkit/Dockerfile

26 lines
825 B
Docker

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 \
&& git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/openmapkit \
&& cd /srv/openmapkit \
&& git submodule update --init \
&& pip install -r requirements.txt \
&& npm install -g yarn \
&& npm install libxmljs \
&& yarn \
&& addgroup -S -g 8007 omk \
&& adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \
&& apk --no-cache del git build-base py2-pip \
&& rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \
&& rm -rf /root/* || true
VOLUME ["/srv/openmapkit/data"]
EXPOSE 8007
USER omk
ENV NODE_ENV production
CMD ["node", "/srv/openmapkit/server.js"]