Install OpenMapKit's Yarn as native dependency package

This commit is contained in:
Disassembler 2017-12-25 08:49:50 +01:00
parent 013551c143
commit a17cd6e4f3

View File

@ -9,7 +9,7 @@ RUN \
# Install runtime dependencies # Install runtime dependencies
apk --no-cache add nodejs openjdk8-jre-base \ apk --no-cache add nodejs openjdk8-jre-base \
# Install build dependencies # Install build dependencies
&& apk --no-cache add --virtual .deps git build-base paxctl py2-pip \ && apk --no-cache add --virtual .deps git build-base paxctl py2-pip yarn \
# Fix grsec attributes to loosen memory protection restrictions # Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/bin/node \ && paxctl -cm /usr/bin/node \
# Clone OpenMapKit # Clone OpenMapKit
@ -18,12 +18,12 @@ RUN \
&& git submodule update --init \ && git submodule update --init \
# Install OpenMapKit dependencies # Install OpenMapKit dependencies
&& pip install -r requirements.txt \ && pip install -r requirements.txt \
&& npm install -g yarn \
&& npm install libxmljs \ && npm install libxmljs \
&& yarn \ && yarn \
# Create OS user # Create OS user
&& addgroup -S -g 8007 omk \ && addgroup -S -g 8007 omk \
&& adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \ && adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \
&& chown -R omk:omk /srv/openmapkit \
# Cleanup # Cleanup
&& apk --no-cache del .deps \ && apk --no-cache del .deps \
&& rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \ && rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \