From 2501b593a41a2dfb31474ea381861a607b12fe2f Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 21 Dec 2017 10:39:35 +0100 Subject: [PATCH] Add OpenMapKit Dockerfile comments --- openmapkit/Dockerfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/openmapkit/Dockerfile b/openmapkit/Dockerfile index e03778e..2b8ee80 100644 --- a/openmapkit/Dockerfile +++ b/openmapkit/Dockerfile @@ -1,20 +1,30 @@ FROM alpine:3.7 MAINTAINER Disassembler -RUN apk --no-cache add python2 +RUN \ + # Install Python2 runtime + apk --no-cache add python2 -RUN apk --no-cache add --virtual .deps git build-base paxctl py2-pip \ - && apk --no-cache add nodejs git openjdk8-jre-base \ +RUN \ + # Install runtime dependencies + apk --no-cache add nodejs git openjdk8-jre-base \ + # Install build dependencies + && apk --no-cache add --virtual .deps git build-base paxctl py2-pip \ + # Fix grsec attributes to loosen memory protection restrictions && paxctl -cm /usr/bin/node \ + # Clone OpenMapKit && git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/openmapkit \ && cd /srv/openmapkit \ && git submodule update --init \ + # Install OpenMapKit dependencies && pip install -r requirements.txt \ && npm install -g yarn \ && npm install libxmljs \ && yarn \ + # Create OS user && addgroup -S -g 8007 omk \ && adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \ + # Cleanup && apk --no-cache del .deps \ && rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \ && rm -rf /root \