2019-09-18 11:29:58 +02:00
|
|
|
IMAGE openmapkit_0.12.0-190620
|
2019-11-30 09:59:32 +01:00
|
|
|
FROM alpine3.9-java8_8.212.04-190620
|
2018-09-13 14:07:44 +02:00
|
|
|
|
|
|
|
RUN EOF
|
2019-11-30 09:59:32 +01:00
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add python2 nodejs
|
|
|
|
|
2018-09-13 14:07:44 +02:00
|
|
|
# Install build dependencies
|
|
|
|
apk --no-cache add --virtual .deps build-base git py2-pip yarn
|
|
|
|
|
|
|
|
# Clone OpenMapKit
|
|
|
|
git clone --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit
|
|
|
|
cd /srv/openmapkit
|
2019-10-14 07:59:06 +02:00
|
|
|
git submodule update --init #TODO: Why does this fail?
|
2018-09-13 14:07:44 +02:00
|
|
|
|
|
|
|
# Install OpenMapKit dependencies
|
|
|
|
pip install -r requirements.txt
|
2019-02-26 20:24:02 +01:00
|
|
|
yarn add libxmljs
|
2018-09-13 14:07:44 +02:00
|
|
|
yarn
|
|
|
|
cd frontend
|
|
|
|
yarn
|
|
|
|
yarn build
|
|
|
|
|
|
|
|
# Create OS user
|
2019-10-14 07:59:06 +02:00
|
|
|
addgroup -S -g 8080 omk
|
|
|
|
adduser -S -u 8080 -h /srv/openmapkit -s /bin/false -g omk -G omk omk
|
2018-09-13 14:07:44 +02:00
|
|
|
chown -R omk:omk /srv/openmapkit
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
apk --no-cache del .deps
|
|
|
|
find /srv/openmapkit -name '.git*' -exec rm -rf {} +
|
|
|
|
rm -rf /usr/local/share/.cache
|
|
|
|
rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm
|
|
|
|
EOF
|
|
|
|
|
2018-09-21 11:04:12 +02:00
|
|
|
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
|
2018-09-18 16:27:42 +02:00
|
|
|
COPY lxc
|
|
|
|
|
|
|
|
CMD s6-svscan /etc/services.d
|