Skip to content

Commit

Permalink
Use chown instead of chmod when copying JAR in Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Mar 28, 2024
1 parent 7ec377c commit f3ee3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RUN mkdir -p ${APP_DIR} ${DATA_DIR} \
COPY --from=jre-build /opt/java/openjdk $JAVA_HOME

# Copy the compiled WAR to the application directory created above
COPY --chmod=755 ./target/${WAR_FILENAME} ./src/main/docker/logback-json.xml ${APP_DIR}
COPY --chown=${UID}:${GID} ./target/${WAR_FILENAME} ./src/main/docker/logback-json.xml ${APP_DIR}

# Specify the user to run as (in numeric format for compatibility with Kubernetes/OpenShift's SCC)
USER ${UID}
Expand Down

0 comments on commit f3ee3a4

Please sign in to comment.