39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
IMAGE openmapkit_0.12.0-200313
|
|
FROM alpine3.11-java8_8.242.08-200313
|
|
|
|
RUN EOF
|
|
# Install runtime dependencies
|
|
apk --no-cache add python2 nodejs
|
|
|
|
# Install build dependencies
|
|
apk --no-cache add --virtual .deps build-base git py2-pip yarn
|
|
|
|
# Clone OpenMapKit
|
|
git clone --recursive --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit
|
|
|
|
# Install OpenMapKit dependencies
|
|
cd /srv/openmapkit
|
|
pip install -r requirements.txt
|
|
yarn add libxmljs
|
|
yarn
|
|
cd frontend
|
|
yarn
|
|
yarn build
|
|
|
|
# Create OS user
|
|
addgroup -S -g 8080 omk
|
|
adduser -S -u 8080 -h /srv/openmapkit -s /bin/false -g omk -G omk omk
|
|
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
|
|
|
|
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
|
|
COPY image.d
|
|
|
|
CMD /bin/s6-svscan /etc/services.d
|