Closed wibed closed 11 months ago
Here's my fixed version of your Dockerfile:
FROM --platform=linux/amd64 alpine:latest
RUN \
apk -u fix \
&& apk --no-cache add xz curl libstdc++ \
&& curl -sL 'https://unofficial-builds.nodejs.org/download/release/v20.5.1/node-v20.5.1-linux-x64-musl.tar.xz' | xzcat | tar -vx --strip-components=1 -C /usr/local
ENTRYPOINT [ "node", "--version" ]
$ docker run c6a61504872d77a81d936e80807150577324e765c0b4d0c245838b630f505411
v20.5.1
Diff:
5c5
< && apk --no-cache --no-update add xz curl \
---
> && apk --no-cache add xz curl libstdc++ \
8c8
< ENTRYPOINT [ "node" "version" ]
---
> ENTRYPOINT [ "node", "--version" ]
(libstdc++ being the main thing doing the trick here, but other fixes necessary to make it run)
ooc on the hub there are alpine images
https://hub.docker.com/_/node/
are those related to those unofficial builds?
Yeah, sort of. They are built out of https://github.com/nodejs/docker-node, the Alpine images in the template @ https://github.com/nodejs/docker-node/blob/main/Dockerfile-alpine.template use unofficial-builds tarballs where they can.
ran the following:
the main page indicates it builds against musl libc 1.1.2 i dont know why this seems to be built for a different platform.