nodejs / docker-node

Official Docker Image for Node.js :whale: :turtle: :rocket:
https://hub.docker.com/_/node/
MIT License
8.13k stars 1.95k forks source link

v22.0.0 `arm` image broken #2074

Closed lenovouser closed 2 months ago

lenovouser commented 2 months ago

Environment

Expected Behavior

It should work

Current Behavior

Linux (Cloud Server)

> docker run -it node:22-alpine sh
exec /usr/local/bin/docker-entrypoint.sh: exec format error

lscpu:

Architecture:             aarch64
  CPU op-mode(s):         32-bit, 64-bit
  Byte Order:             Little Endian
CPU(s):                   16
  On-line CPU(s) list:    0-15
Vendor ID:                ARM
  BIOS Vendor ID:         QEMU
  Model name:             Neoverse-N1
    BIOS Model name:      NotSpecified
    Model:                1
    Thread(s) per core:   1
    Core(s) per socket:   16
    Socket(s):            1
    Stepping:             r3p1
    BogoMIPS:             50.00
    Flags:                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
NUMA:
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-15

macOS

> docker run -it node:22-alpine sh
/ # node
...hangs forever

lscpu:

Architecture:           armv7l
  Byte Order:           Little Endian
CPU(s):                 8
  On-line CPU(s) list:  0-7
Vendor ID:              Apple
  Model name:           -
    Model:              0
    Thread(s) per core: 1
    Core(s) per socket: 8
    Socket(s):          1
    Stepping:           0x0
    BogoMIPS:           48.00
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
sameignatovich commented 2 months ago

Also i found what command corepack enable not working (it's just stuck)

lpgera commented 2 months ago

I'm experiencing similar issues with the arm64 version of the 22-slim image on GitHub Actions, so it's not just the alpine version that's broken:

exec /bin/sh: exec format error
LaurentGoderre commented 2 months ago

Confirmed for alpine but slim works for me:

docker run -it node:22-slim sh  
Unable to find image 'node:22-slim' locally
22-slim: Pulling from library/node
Digest: sha256:dd35b71aa2abfac78734d1a2bc70416228444619c1f46239e09d3201bb4d8bc8
Status: Downloaded newer image for node:22-slim
# node
Welcome to Node.js v22.0.0.
Type ".help" for more information.
> console.log('test');
test
LaurentGoderre commented 2 months ago

This doesn't affect amd64. Until the problem is solvedm, you could get around by using docker run --platform linux/amd64

LaurentGoderre commented 2 months ago

The issue is that the arm64v8 arch don't exist...yet. (Not sure why atm). So it falls back to using the arm32v7 arch which hangs.

So we have two issues here. Fix the arm64 builds and fix the arm32 image.

tianon commented 2 months ago

FWIW, the downstream infrastructure issues are fixed (and so the arm64 builds are available now).