Skip to content

Commit

Permalink
Save one layer
Browse files Browse the repository at this point in the history
  • Loading branch information
BWibo committed Nov 24, 2023
1 parent a28888b commit f5ea348
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ ENV CITYDB_TOOL_VERSION=${CITYDB_TOOL_VERSION}
# Copy from builder
COPY --from=builder /build/citydb-cli/build/install/3DCityDB-Command-Line-Tool /opt/citydb-tool

# Run as non-root user
# 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 and set permissions
RUN ln -sf /opt/citydb-tool/citydb /usr/local/bin
useradd --uid 1000 --gid 1000 -d /data -m -r --no-log-init citydb-tool && \
ln -sf /opt/citydb-tool/citydb /usr/local/bin

WORKDIR /data
USER 1000
Expand Down

0 comments on commit f5ea348

Please sign in to comment.