Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ENV dspace__P__dir=/dspace
# because Kubernetes deployment accepts only numeric user IDs when specifying the container user.
RUN useradd -u 1100 -m -s /bin/bash dspace
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
COPY --chown=dspace:root --from=ant_build /dspace $dspace__P__dir
COPY --from=ant_build /dspace $dspace__P__dir
WORKDIR $dspace__P__dir
# Need host command for "[dspace]/bin/make-handle-config"
RUN apt-get update \
Expand All @@ -71,6 +71,17 @@ EXPOSE 8080 8000
# Give java extra memory (2GB)
ENV JAVA_OPTS=-Xmx2000m

# App files stay owned by root. dspace writes only to the data folders. /dspace and solr/search/conf are
# sticky, so dspace can add and remove its own entries there (temp, reindex.flag), but not replace the others.
# Missing folders are created so named volumes (not bind mounts) inherit the owner.
RUN for dir in assetstore ctqueues exports handle-server imports log reports sitemaps temp \
triplestore upload var; do \
mkdir -p /dspace/$dir && chown -R dspace:dspace /dspace/$dir; \
Comment thread
milanmajchrak marked this conversation as resolved.
Resolved
done \
&& chown root:dspace /dspace /dspace/solr/search/conf \
&& chmod 1775 /dspace /dspace/solr/search/conf \
&& chmod -R a+rX /dspace/bin

USER dspace

# On startup, run DSpace Runnable JAR (uses the "dspace.dir" setting defined in "dspace__P__dir" env variable)
Expand Down
Loading