Skip to content

Fix Docker node_modules and search_meta shadowing#558

Open
ericsandu wants to merge 3 commits intounikraft:mainfrom
ericsandu:ericsandu/fix-dockerfile
Open

Fix Docker node_modules and search_meta shadowing#558
ericsandu wants to merge 3 commits intounikraft:mainfrom
ericsandu:ericsandu/fix-dockerfile

Conversation

@ericsandu
Copy link
Copy Markdown
Contributor

This commit fixes #554 which is caused by the container not having access to installed node_modules directory, there being the possibly of it getting overwritten / shadowed by a currently existing one. The instructions in README.md have been accordingly to fix this problem by forcing the use of the containers node_modules directory.

During testing I also discovered the possibility of the search-meta configuration getting overwritten, so the Dockerfile has been updated to generate it at runtime, preventing this issue.

Generate search-meta directly at runtime in the mounted volume.

Signed-off-by: Eric Sandu <eric_andrei.sandu@stud.acs.upb.ro>
@ericsandu ericsandu force-pushed the ericsandu/fix-dockerfile branch from 04f3da2 to 774691a Compare May 3, 2026 12:13
@razvand razvand self-requested a review May 3, 2026 14:46
@razvand razvand self-assigned this May 3, 2026
@razvand razvand added the enhancement New feature or request label May 3, 2026
@razvand razvand requested review from John-Ted and StefanJum May 3, 2026 14:52
@ericsandu
Copy link
Copy Markdown
Contributor Author

ericsandu commented May 3, 2026

I've updated the Dockerfile to include gcompat on top of libc6-compat to fix compilation errors with native modules (like esbuild) which occured on the current configuration, likely due to the use of an Alpine base that uses musl instead of glibc.

I've also added openssl and git, them being dependencies of used modules like octokit, husky and lint-staged which are needed for the metadata scripts and dev tools to run properly inside the container.

In regards to the linter errors I am not exactly knowledgeable on what specific version I should mention for the installed packages and if it even if a good idea to force versions directly. Advice would be greatly appreciated.

@ericsandu ericsandu force-pushed the ericsandu/fix-dockerfile branch from a10d7f1 to 857ef09 Compare May 3, 2026 20:19
ericsandu added 2 commits May 9, 2026 10:57
Specifies node_modules location on the container to prevent shadowing with the local one.

Signed-off-by: Eric Sandu <eric_andrei.sandu@stud.acs.upb.ro>
Adds necessary packages for Alpine and bypasses postinstall script during dependency installation.

Signed-off-by: Eric Sandu <eric_andrei.sandu@stud.acs.upb.ro>
@ericsandu ericsandu force-pushed the ericsandu/fix-dockerfile branch from 857ef09 to 8a5c8df Compare May 9, 2026 07:58
@ericsandu
Copy link
Copy Markdown
Contributor Author

I have changed the Docker instructions in the README.md to instruct the user to use a named volume for the node_modules of the documentation, named appropriately as unikraft_modules.

Now this module will be shared between multiple docker instances of the documentation that might be running, and allow easy removal of it instead of having dangling anonymous volumes after the removal of the containers.

@ericsandu ericsandu force-pushed the ericsandu/fix-dockerfile branch 2 times, most recently from cc7a9ad to 8a5c8df Compare May 9, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README: Local development commands don't work

2 participants