Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alpine deno using musl-c compatibility #5

Closed
wants to merge 2 commits into from

Conversation

traceypooh
Copy link

@traceypooh traceypooh commented Jan 23, 2024

musl-c alpine (eg: FROM alpine; RUN apk add deno) support would be nice

musl-c alpine (eg: FROM alpine; RUN apk add alpine) support would be nice
@evanw
Copy link
Contributor

evanw commented Jan 23, 2024

Sorry, I don't know anything about this configuration. Can you give a little more context for this? Have you already tested the binary present in @esbuild/linux-x64 and verified that it works on such a system? And have you verified that the value of Deno.build.target is indeed x86_64-alpine-linux-musl on that system?

@traceypooh
Copy link
Author

hi there! (oof OMG i had a typo in my pull description -- apk add alpine should be apk add deno).

yes, I verified that if I run my setup, using your setup, in an alpine linux docker container.

here's an example of what I'm talking about:

>  docker run --rm -it --pull=always alpine sh
latest: Pulling from library/alpine
Digest: sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
Status: Image is up to date for alpine:latest
/ # apk add deno
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
(1/10) Installing ca-certificates (20230506-r0)
(2/10) Installing libffi (3.4.4-r3)
(3/10) Installing libgcc (13.2.1_git20231014-r0)
(4/10) Installing icu-data-en (74.1-r0)
Executing icu-data-en-74.1-r0.post-install
*
* If you need ICU with non-English locales and legacy charset support, install
* package icu-data-full.
*
(5/10) Installing libstdc++ (13.2.1_git20231014-r0)
(6/10) Installing icu-libs (74.1-r0)
(7/10) Installing sqlite-libs (3.44.2-r0)
(8/10) Installing zlib-ng (2.1.6-r0)
(9/10) Installing zstd-libs (1.5.5-r8)
(10/10) Installing deno (1.38.1-r0)
Executing busybox-1.36.1-r15.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 89 MiB in 25 packages
/ # deno repl
Deno 1.38.1
exit using ctrl+d, ctrl+c, or close()
> Deno.build.target
"x86_64-alpine-linux-musl"

We are using your amazing tool for all of the production compiled/transpiled JS at archive.org website 😁

We transpile down to ES5 (we have a bunch of older-timey folks with very old iOS devices whose OS upgrades stop at only partial ES6 compatibility).

So I built
https://deno.land/x/esbuild_es5

which uses your setup + swc to get it down to ES5

When I ran our vr esbuild (deno velociraptor) inside an alpine linux container for some other initiatives -- that's where I stumbed into the above limitation.

So I figured that I'd try a fork and addition to see if the vr esbuild would work -- and it did :)

@traceypooh
Copy link
Author

(Musing). I was curious... it looked like the main thrust of the target checking was trying to pick between linux or windows forks (or nicely fatal out). It made me wonder if a more general check for Deno.build.target and linux went down the unix pathway (possibly w/ a warning about not officially supported targets when that's the case), etc.?

@evanw
Copy link
Contributor

evanw commented Jan 27, 2024

Yes. However, I want to sanity-check platforms before having esbuild install itself on them. That way I know there's at least one human who's a) cares about that configuration and b) has tried esbuild out on that system.

This should be in the next esbuild release.

@traceypooh
Copy link
Author

that totally makes sense to me.

and I hope it feels good to know real people and organizatiosn are using your groundbreaking code.
between esbuild and esm.sh (we self-host it)... it's game changing and a new era.
thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants