-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
50 lines (38 loc) · 1.6 KB
/
Dockerfile
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-jdk-slim'
ARG RUNTIME_IMAGE_TAG='17-slim'
# Base image
FROM openjdk:${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 openjdk:${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 groupadd --gid 1000 -r impexp && \
useradd --uid 1000 --gid 1000 -d /data -m -r --no-log-init 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"