Skip to content

Commit

Permalink
create, add and run as user in last stage for dockerfile.cli
Browse files Browse the repository at this point in the history
  • Loading branch information
OyvindLGjesdal committed Oct 9, 2024
1 parent 9355d7a commit 1963f80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ RUN ant init_installation update_configs update_code
FROM openjdk:${JDK_VERSION}
# NOTE: DSPACE_INSTALL must align with the "dspace.dir" default configuration.
ENV DSPACE_INSTALL=/dspace
RUN groupadd -g 1234 dspace && \
useradd -u 1234 -g dspace dspace
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
COPY --from=ant_build /dspace $DSPACE_INSTALL
COPY --from=ant_build --chown 1234:1234 /dspace $DSPACE_INSTALL
# Give java extra memory (1GB)
ENV JAVA_OPTS=-Xmx1000m
USER dspace

0 comments on commit 1963f80

Please sign in to comment.