Could not get uid/gid when building Node/Docker

UPD Fixed in nodejs@12.4.0?

Check if this is linked to nodejs/docker-node issue 813:

Root cause seems to be: Thread stack size

The default stack size for new threads on glibc is determined based on the resource limit governing the main thread’s stack (RLIMIT_STACK).
It generally ends up being 2-10 MB.

There three possible solutions:

  • Talk to Alpine teams to fix it. There were some discussions already
  • Fix it in the node docker alpine image as follows
  • Set default npm_config_unsafe_perm=true in the docker image as a workaround until it’s fixed.

You already tried the third option, but consider also:

Alternatively, you should switch to the slim (Debian) variant until this get’s fixe upstream by the Alpine team.

Leave a Comment

tech