Docker local build fails

33 views
Skip to first unread message

Agustina Martinez-Garcia

unread,
Dec 5, 2024, 2:50:59 AM12/5/24
to DSpace Technical Support
Hi all,

I'm trying to test a PR locally (current DSpace 9.x branch) following the instructions as per https://wiki.lyrasis.org/display/DSPACE/Testing+DSpace+Github+Pull+Requests.

When trying to rebuild the backed via this command as per the instructions, I get the error below:

docker compose -f docker-compose.yml -f docker-compose-cli.yml build --no-cache

Error:

=> CANCELED [dspace ant_build 6/6] RUN ant init_installation update_configs update_code update_webapps                                                              10.0s
 => [dspace-cli ant_build 5/6] RUN mkdir /tmp/ant-1.10.13 &&     wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.13-bin.tar.gz" | tar -zx --  1.6s
 => [dspace-cli ant_build 6/6] RUN ant init_installation update_configs update_code                                                                                   7.6s
 => ERROR [dspace-cli stage-2 2/3] COPY --from=ant_build /dspace /dspace                                                                                              0.0s
------
 > [dspace-cli stage-2 2/3] COPY --from=ant_build /dspace /dspace:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref ae9acf11-5f05-42c8-8563-bdd523458d27::of0rj5pfb01o5g8bfk9395ypy: "/dspace": not found

Is anybody experiencing the same issue? I am using a Mac.

Best,
Agustina

Agustina Martinez-Garcia

unread,
Dec 5, 2024, 3:11:03 AM12/5/24
to DSpace Technical Support
Hi all,

In case if helps anybody running into the same issue. My local.cfg had a different value for dspace.dir variable. The notes in Dockerfile explicitly specify that that value needs to match (from Dockerfile below):

# NOTE: DSPACE_INSTALL must align with the "dspace.dir" default configuration.
ENV DSPACE_INSTALL=/dspace

Best,
Agustina
Reply all
Reply to author
Forward
0 new messages