forked from 3dcitydb/importer-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
50 lines (38 loc) · 1.61 KB
/
Dockerfile.alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 3DCityDB Importer/Exporter Dockerfile #######################################
# Official website https://www.3dcitydb.org
# GitHub https://github.com/3dcitydb/importer-exporter
###############################################################################
# Fetch & build stage #########################################################
# ARGS
ARG BUILDER_IMAGE_TAG='17'
ARG RUNTIME_IMAGE_TAG='17'
# Base image
FROM bellsoft/liberica-openjdk-alpine:${BUILDER_IMAGE_TAG} AS builder
# Copy source code
WORKDIR /build
COPY . /build
# Build
RUN chmod u+x ./gradlew && ./gradlew installDockerDist
# Runtime stage ###############################################################
# Base image
FROM bellsoft/liberica-openjdk-alpine:${RUNTIME_IMAGE_TAG} AS runtime
# Version info
ARG IMPEXP_VERSION
ENV IMPEXP_VERSION=${IMPEXP_VERSION}
# Copy from builder
COPY --from=builder /build/impexp-client-cli/build/install/3DCityDB-Importer-Exporter-Docker /opt/impexp
# Run as non-root user
RUN addgroup -g 1000 -S impexp && \
adduser -u 1000 -G impexp -h /data -S impexp
# Put start script in path and set permissions
RUN ln -sf /opt/impexp/impexp /usr/local/bin/ && \
chmod a+x /opt/impexp/contribs/collada2gltf/*linux*/COLLADA2GLTF-bin
WORKDIR /data
USER 1000
ENTRYPOINT ["impexp"]
CMD ["--help"]
# Labels ######################################################################
LABEL maintainer="Bruno Willenborg"
LABEL maintainer.email="b.willenborg(at)tum.de"
LABEL maintainer.organization="Chair of Geoinformatics, Technical University of Munich (TUM)"
LABEL source.repo="https://github.com/3dcitydb/importer-exporter"