Docker issue with dspace-angular

734 views
Skip to first unread message

Stephen Brush

unread,
Jan 11, 2022, 4:06:37 PM1/11/22
to DSpace Community
Is the Docker image for front end still active and working for others?

I receive the following when starting that container:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - Javascript heap out of memory

angular-error.png

Tim Donohue

unread,
Jan 11, 2022, 5:30:47 PM1/11/22
to DSpace Community
Hi,

Yes, the dspace-angular Docker image based on `main` codebase is still working.  It's sample Docker compose files can be found at https://github.com/DSpace/dspace-angular/tree/main/docker

It's possible you are using an old or outdated (or third party) Docker image, as you didn't specify which one you are using, or what instructions you may be following.

That specific error seems to imply you are using a incorrect version of Node.  The DSpace Angular UI requires Node 12 or 14, and as that StackOverflow question you linked to says, one of the "answers" was to upgrade to Node v12.

In any case, I can verify that the Docker images based on the GitHub codebase are maintained & updated every time we push out a code change.  However, we don't recommend running them in Production at this time, as they have not be tested in Production scenarios.  They are also available at https://hub.docker.com/r/dspace/dspace-angular

If you have other questions, let us know on this list

Tim

Stephen Brush

unread,
Jan 12, 2022, 2:07:48 PM1/12/22
to DSpace Community

I believe I am using the standard instructions from the README file from https://github.com/DSpace/DSpace/tree/dspace-7.1/dspace/src/main/docker-compose.

From the instructions:

docker-compose -f docker-compose.yml -f docker-compose-cli.yml pull

docker-compose -p d7 -f docker-compose.yml -f dspace/src/main/docker-compose/docker-compose-angular.yml up -d

This results in dspace-angular image ID '458d242c63ba' being pulled and run, with that fatal error happening in the logs.

 I don't think what I have on my host is any consequence as the node/yarn actions are taking place in the container correct? It appears the image has node v14.18.2 and yarn 1.22.15 installed.

I guess the dspace-angular project is separate on GitHub -- but I assume that should not matter as the above commands just leverage the image that project creates.

Steve

Stephen Brush

unread,
Jan 17, 2022, 1:51:33 PM1/17/22
to DSpace Community
UPDATE -- still not working.

I tried the instructions from another link, though they are basically the same and had the same results. I can reach the HAL browser on the REST server, but the Angular front end fails with

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - Javascript heap out of memory.

Is this happening for anyone else??

angular-error2.png

Steve

Tim Donohue

unread,
Jan 20, 2022, 3:22:28 PM1/20/22
to DSpace Community
Hi Steve,

I can verify that these Docker scripts work on my end (I use Docker almost daily to test new features/code being built for DSpace 7).  The "Javascript heap out of memory." error almost sounds like your Docker installation ran out of memory on your local machine.  Could you describe a bit more about your setup?  For instance, what OS are you using?  Do you have sufficient memory on your machine (to run all the Docker images together, you honestly may need 4-6GB at least just for Docker)?  Are you installing Docker Desktop (like noted at https://wiki.lyrasis.org/display/DSPACE/Try+out+DSpace+7#TryoutDSpace7-InstallviaDocker), or are you using some different version of Docker?

While we honestly haven't tested these Docker scripts on every single OS, I've been told they work on Mac, and I'm on Windows 10 myself.   It's possible there's some new bug or issue that has come up recently, but I can verify that I have these Docker scripts running on Windows 10 today.

I should also note, if you are just trying to try out the UI, it's also possible to just install the UI quickly on its own & use our public demo REST API as the backend. That doesn't even require Docker.  Here's that setup: https://wiki.lyrasis.org/display/DSPACE/Try+out+DSpace+7#TryoutDSpace7-InstalltheUserInterfaceonly

If you can send us more basic info on this list about your setup, it's possible we'd be able to figure out what is causing the Docker scripts not to work for you.

Tim

Stephen Brush

unread,
Jan 26, 2022, 1:33:23 PM1/26/22
to DSpace Community
 I never resolved the Docker issue. It could have been related to overall memory usage on my PC but nothing to me suggested it was a problem.

I ended up setting up a local Dev env on my Windows machine since that would be required anyways in the future. The docs I had to reference were pretty old -- I captured some notes here in case anyone is up for updating the docs on Confluence.

tmi...@gmail.com

unread,
Jun 21, 2023, 1:27:34 PM6/21/23
to DSpace Community
Hi Stephen,

Did you ever get this working? I am running into this on my M1 Mac.

Thanks!
Tom

Stephen Brush

unread,
Jul 5, 2023, 11:49:23 AM7/5/23
to DSpace Community
We did not -- just set up a true local dev env instead.
Reply all
Reply to author
Forward
0 new messages