forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile.dev-base
32 lines (29 loc) · 1.27 KB
/
Dockerfile.dev-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# UMD-provided file running DSpace as part of a "Quick Build" setup
# This file is based on "Dockerfile.dev"
ARG JDK_VERSION=17
ARG DSPACE_VERSION=latest
# Step 1 - Run Maven Build
# UMD Customization
FROM docker.lib.umd.edu/drum-dependencies-8_x:${DSPACE_VERSION} as build
# End UMD Customization
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
RUN mkdir /install \
&& chown -Rv dspace: /install \
&& chown -Rv dspace: /app
USER dspace
# Copy the DSpace source code (from local machine) into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
# Build DSpace
# Copy the dspace-installer directory to /install. Clean up the build to keep the docker image small
# Maven flags here ensure that we skip building test environment and skip all code verification checks.
# These flags speed up this compilation as much as reasonably possible.
ENV MAVEN_FLAGS="-P-test-environment -Denforcer.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -Dxml.skip=true"
# UMD Customization
RUN mvn install ${MAVEN_FLAGS} && \
mvn clean
# End UMD Customization
# Remove the server webapp to keep image small.
RUN rm -rf /install/webapps/server/
# UMD Customization - Remaining steps are handled by Dockerfile.dev-additions