-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Binary not working in Linux Alpine after upgrading from 5.12.1 to 5.13.0 #88
Comments
Hi @pabloFuente thanks for your issue, I think you are using pkg 5.14.0 and not 5.13.0 as 5.13 doens't have support for nodejs 22. Anyway does using nodejs 20 works? Ref #87 |
cc @faulpeltz |
Both binaries for node 20 and node 22 work with your Dockerfile example on my machine @pabloFuente - what is the exact target your building? Things you can try:
|
Also you should build against latest-alpine not latest-linux, this should not need gcompat anyway |
I think the problem is exactly this, I didn't noticed the command at start... |
You were absolutetly correct. The proper target when packaging the binary should be Using FROM alpine:3.20.3
COPY server /bin
CMD ["/bin/server"] The reason why the target Thank you for the quick support! |
What version of pkg are you using?
5.13.0
What version of Node.js are you using?
22.8.0
What operating system are you using?
Ubuntu 22.04
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
Node 22.8.0 for Alpine Linux 3.20.0
Describe the Bug
I have a Dockerfile using
FROM alpine:3.20.3
where I run the Node binary (built with Node 22.8.0) generated with@yao-pkg/pkg
. The binary is built with this command:The resulting binary
server
works fine inside my Docker container based on alpine:3.20.3 if I build it with@yao-pkg/pkg:5.12.1
, but it doesn't work if I build it with@yao-pkg/pkg:5.13.0
. The error logged by the container in the latter case is this one:My only guess based on the commit history of the repository is this dependency update between versions 5.12.1 and 5.13.0: dda9032#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L28
Expected Behavior
A Node binary built with
@yao-pkg/pkg:5.13.0
should work fine inside a Linux Alpine 3.20.3 container, as it did with@yao-pkg/pkg:5.12.1
.To Reproduce
Pack a Node binary using
@yao-pkg/pkg:5.13.0
and build a Docker container using the Dockerfile below. Any simple Node application should work. The resulting binary is referred asserver
in the Dockerfile:Running the container will output the following error:
Doing the same using
@yao-pkg/pkg:5.12.1
will NOT trigger this error.The text was updated successfully, but these errors were encountered: