Skip to content

Unable to run container with readOnlyRootFilesystem and "nodeModulesDir": "auto" #446

@M4RC3L05

Description

@M4RC3L05

Like the title says, running the a deno docker container that uses node_module with "nodeModulesDir": "auto" on a read only root file system seems to be giving me errors like:

podman run --rm -it --read-only docker.io/maingufu/rss-hub:latest deno run -A --cached-only --unstable-npm-lazy-caching src/apps/api/main.ts
Could not initialize cache database '/deno-dir/dep_analysis_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file")))
Could not initialize cache database '/deno-dir/node_analysis_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file")))
Could not initialize cache database '/deno-dir/v8_code_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file")))
Failed to open cache file '/deno-dir/v8_code_cache_v2', performance may be degraded.
Failed to open cache file '/deno-dir/node_analysis_cache_v2', opening in-memory cache.
Failed to open cache file '/deno-dir/dep_analysis_cache_v2', opening in-memory cache.
error: File exists (os error 17), symlink '../../[email protected]/node_modules/normalize-url' -> '/app/node_modules/.deno/@[email protected]/node_modules/normalize-url'

And if i remove the nodeModulesDir from deno.json our setting it to none, will run ok.
Is deno incompatible, or do we have lower performace while running with readOnlyRootFilesystem enabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions