-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from telicent-oss/core_673_update_base_image
[CORE-673] Updating dockerfile to use Telicent crafted base image
- Loading branch information
Showing
2 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
# | ||
# Copyright (C) Telicent Ltd | ||
# | ||
|
||
# syntax=docker/dockerfile:1.7 | ||
|
||
FROM eclipse-temurin:21-jre as rdf-abac-evaluator | ||
FROM telicent/telicent-java21:1.1.5 AS rdf-abac-evaluator | ||
|
||
WORKDIR /app | ||
USER root | ||
|
||
# Define argument with a default value to prevent build failures | ||
ARG PROJECT_VERSION | ||
|
||
RUN mkdir /config | ||
# Set up directories and user in a single efficient step | ||
RUN mkdir -p /app /config /opt/telicent/sbom && \ | ||
chown -R user:user /app /config /opt/telicent/sbom | ||
|
||
RUN useradd -Mg root telicent-service | ||
USER telicent-service | ||
WORKDIR /app | ||
|
||
COPY src/main/resources/* /config/ | ||
# Copy config and application files | ||
COPY --chown=user:user src/main/resources/ /config/ | ||
COPY --chown=user:user target/rdf-abac-evaluator-${PROJECT_VERSION}.jar /app/app.jar | ||
COPY --chown=user:user target/rdf-abac-evaluator-${PROJECT_VERSION}-bom.json /opt/telicent/sbom/ | ||
|
||
ARG PROJECT_VERSION | ||
USER user | ||
|
||
COPY target/rdf-abac-evaluator-${PROJECT_VERSION}.jar /app/app.jar | ||
ENTRYPOINT java -cp /app/app.jar $CLASSNAME $ARGS | ||
ENTRYPOINT /usr/bin/dumb-init -v --single-child -- java -cp /app/app.jar $CLASSNAME $ARGS |