Skip to content

Podman fails to pull pre-build image due to node_modules UID/GID #1394

@jordancarlin

Description

@jordancarlin

Describe the bug
When pulling the container image using Podman, the following error occurs:

Error: unable to copy from source docker://riscvintl/udb:0.15: copying system image from manifest list: writing blob: adding layer with blob "sha256:64f1ee69c61640b9f75907abdeaf8f7e3e160bfcd1c11139323f05b6ed25f309"/""/"sha256:301fbf64919459893db36f95c9d01cf5c28bdc115ac8321536efa0cb40012feb": unpacking failed (error: exit status 1; output: potentially insufficient UIDs or GIDs available in user namespace (requested 376884:5762 for /opt/node/node_modules/clone-stats/LICENSE.md): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /opt/node/node_modules/clone-stats/LICENSE.md: invalid argument)

The setup script falls back to building the image locally, but this slows initials runs down significantly.

To Reproduce
Steps to reproduce the behavior:
Run the following:

podman pull docker.io/riscvintl/udb:0.15

Additional context
Apparently older versions of npm preserve the UID/GID metadata from the build system, which is not always an available UID/GID on the system running the image. Docker ignores this, but Podman throws an error. This has supposedly been fixed in newer versions of npm (npm/cli#5998 (comment)), so upgrading npm might be the cleanest solution. There are also some hacky workarounds that involve changing the file ownership.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions