Skip to content

Commit

Permalink
Merge pull request #44 from 3dcitydb/feature/docker-java-lts-update
Browse files Browse the repository at this point in the history
Docker base image updates
  • Loading branch information
clausnagel authored Nov 18, 2024
2 parents 9179930 + a8e594c commit 926b84e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Fetch & build stage #########################################################
# ARGS
ARG BUILDER_IMAGE_TAG='17-jdk-jammy'
ARG RUNTIME_IMAGE_TAG='17-jdk-jammy'
ARG BUILDER_IMAGE_TAG='21-jdk-noble'
ARG RUNTIME_IMAGE_TAG='21-jre-noble'

# Base image
FROM eclipse-temurin:${BUILDER_IMAGE_TAG} AS builder
Expand All @@ -16,7 +16,8 @@ WORKDIR /build
COPY . /build

# Build
RUN chmod u+x ./gradlew && ./gradlew installDist
RUN set -x && \
chmod u+x ./gradlew && ./gradlew installDist

# Runtime stage ###############################################################
# Base image
Expand All @@ -29,13 +30,12 @@ ENV CITYDB_TOOL_VERSION=${CITYDB_TOOL_VERSION}
# Copy from builder
COPY --from=builder /build/citydb-cli/build/install/citydb-tool /opt/citydb-tool

# Run as non-root user, put start script in path and set permissions
RUN groupadd --gid 1000 -r citydb-tool && \
useradd --uid 1000 --gid 1000 -d /data -m -r --no-log-init citydb-tool && \
# Put start script in path
RUN set -x && \
ln -sf /opt/citydb-tool/citydb /usr/local/bin

WORKDIR /data
USER 1000
WORKDIR /data

ENTRYPOINT ["citydb"]
CMD ["--help"]

0 comments on commit 926b84e

Please sign in to comment.