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

node:lts-alpine apk not found #2037

Closed electriquo closed 4 months ago

electriquo commented 4 months ago

Environment

Expected Behavior

apk should exit in the image. for more information, see steps to reproduce.

Current Behavior

apk isn't found. for more information, see steps to reproduce.

Possible Solution

Steps to Reproduce

$ docker run --rm -it --entrypoint /bin/sh node:lts-alpine@sha256:c0a3badbd8a0a760de903e00cedbca94588e609299820557e72cba2a53dbaa2c -c 'whoami && apk --version'
root
apk-tools 2.14.0, compiled for aarch64.
$ docker run --rm -it --entrypoint /bin/sh node:lts-alpine@sha256:f3299f16246c71ab8b304d6745bb4059fa9283e8d025972e28436a9f9b36ed24 -c 'whoami && apk --version'
root
/bin/sh: 1: apk: not found

Additional Information

LaurentGoderre commented 4 months ago

That SHA references a debian image, not an alpine one.

LaurentGoderre commented 4 months ago

When using a sha reference with a tag, the sha isn't validated against the tag because tags change all the time.