2018-05-07 14:21:09 +02:00
|
|
|
FROM java
|
2018-09-03 22:12:08 +02:00
|
|
|
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
|
2018-05-07 14:21:09 +02:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Install NodeJS runtime
|
2018-07-09 16:21:48 +02:00
|
|
|
apk --no-cache add nodejs
|
2018-05-07 14:21:09 +02:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Install runtime dependencies
|
|
|
|
apk --no-cache add python2
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Install build dependencies
|
2018-09-03 16:00:39 +02:00
|
|
|
apk --no-cache add --virtual .deps build-base git py2-pip yarn \
|
2018-05-07 14:21:09 +02:00
|
|
|
# Clone OpenMapKit
|
|
|
|
&& git clone --depth 1 https://github.com/posm/OpenMapKitServer /srv/openmapkit \
|
|
|
|
&& cd /srv/openmapkit \
|
|
|
|
&& git submodule update --init \
|
|
|
|
# Install OpenMapKit dependencies
|
|
|
|
&& pip install -r requirements.txt \
|
2018-09-03 16:00:39 +02:00
|
|
|
&& yarn \
|
|
|
|
&& cd frontend \
|
|
|
|
&& yarn \
|
|
|
|
&& yarn build \
|
2018-05-07 14:21:09 +02:00
|
|
|
# Create OS user
|
|
|
|
&& addgroup -S -g 8007 omk \
|
|
|
|
&& adduser -S -u 8007 -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
|
|
|
|
|
|
|
|
COPY docker/ /
|
|
|
|
|
|
|
|
VOLUME ["/srv/openmapkit/data"]
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD ["s6-svscan", "/etc/services.d"]
|