Skip to content
Snippets Groups Projects
Commit c7796e8f authored by Alexander König's avatar Alexander König
Browse files

changed Dockerfile to pre-fetch maven dependencies to reduce build time

parent c1ebbf31
No related branches found
No related tags found
No related merge requests found
......@@ -52,14 +52,17 @@ COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
# install Dspace
# pre-fetch maven dependencies
COPY commul-customization/dspace-pom.xml /tmp/pom.xml
WORKDIR /tmp/
# RUN mvn dependency:resolve
RUN mvn -B -T 4 dependency:copy-dependencies dependency:resolve-plugins dependency:go-offline clean
RUN git clone https://github.com/commul/clarin-dspace.git -b commul-custom /opt/repository/sources/dspace
WORKDIR /opt/repository/sources/dspace
RUN mvn compile
#COPY commul-customization/dspace-pom.xml /tmp/pom.xml
#WORKDIR /tmp/
## RUN mvn dependency:resolve
#RUN mvn -B -T 4 dependency:copy-dependencies dependency:resolve-plugins dependency:go-offline clean
# all files could be copied into a /tmp folder within the container first (maybe that could be mounted?); see also dspace-entrypoint.sh
# this checks if there was a new commit since the last build
ADD https://api.github.com/repos/commul/clarin-dspace/git/refs/heads/commul-custom version.json
RUN git clone https://github.com/commul/clarin-dspace.git -b commul-custom /opt/repository/sources/dspace
ADD https://api.github.com/repos/commul/clarin-dspace/git/refs/heads/commul-custom /tmp/version.json
RUN git pull
WORKDIR /opt/repository/sources/dspace/utilities/project_helpers
RUN ./setup.sh /opt/repository/workspace
COPY commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment