-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
41 lines (31 loc) · 1.09 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
# 3DCityDB Importer/Exporter Dockerfile #######################################
# Official website https://www.3dcitydb.org
# GitHub https://github.com/3dcitydb/citydb-tool
###############################################################################
# Fetch & build stage #########################################################
# ARGS
ARG BUILDER_IMAGE_TAG='21-jdk-noble'
ARG RUNTIME_IMAGE_TAG='21-jre-noble'
# Base image
FROM eclipse-temurin:${BUILDER_IMAGE_TAG} AS builder
# Copy source code
WORKDIR /build
COPY . /build
# Build
RUN set -x && \
chmod u+x ./gradlew && ./gradlew installDist
# Runtime stage ###############################################################
# Base image
FROM eclipse-temurin:${RUNTIME_IMAGE_TAG} AS runtime
# Version info
ARG CITYDB_TOOL_VERSION
ENV CITYDB_TOOL_VERSION=${CITYDB_TOOL_VERSION}
# Copy from builder
COPY --from=builder /build/citydb-cli/build/install/citydb-tool /opt/citydb-tool
# Put start script in path
RUN set -x && \
ln -sf /opt/citydb-tool/citydb /usr/local/bin
USER 1000
WORKDIR /data
ENTRYPOINT ["citydb"]
CMD ["--help"]