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

Issue updating an image with a node-gyp build from node:lts-alpine3.13 to node:lts-alpine3.14 while using docker 20.10.2 #1543

Closed
tchupp opened this issue Aug 13, 2021 · 2 comments

Comments

@tchupp
Copy link

tchupp commented Aug 13, 2021

I ran into a weird issue while updating an image with a node-gyp build from node:lts-alpine3.13 to node:lts-alpine3.14 while using docker 20.10.2.

$ npm install node-rdkafka

make: Entering directory '/build/node_modules/node-rdkafka/build'
make: printf: Operation not permitted
make: *** [deps/librdkafka.target.mk:13: deps/librdkafka/config.h] Error 127
make: Leaving directory '/build/node_modules/node-rdkafka/build'

The full output can be seen here: https://app.circleci.com/pipelines/github/tchupp/alpine-docker-engine-conflict

The weirdest part (and the reason I'm opening this issue here) is that this seems to be a conflict with the docker engine, since the issue went away when I upgraded to docker 20.10.6 😳

Environment

  • Platform: Linux, MacOS X
  • Docker Version: tested with 20.10.2 and 20.10.6
  • Node.js Version: tested with lts
  • Image Tag: tested with node:lts-alpine3.13 and node:lts-alpine3.14

Expected Behavior

npm install node-rdkafka completes successfully regardless of docker engine.

Current Behavior

When using node:lts-alpine3.14 on docker 20.10.2 I receive the above error.

alpine docker engine working?
3.13 20.10.2 true
3.13 20.10.6 true
3.14 20.10.2 false
3.14 20.10.6 true

Possible Solution

I don't know enough about NodeJS or how node-gyp interacts with the docker engine to suggest anything.
This was the only remotely related thing I found on the matter, since printf is part of the error message: https://wiki.musl-libc.org/functional-differences-from-glibc.html

Steps to Reproduce

My four test cases are documented here: https://github.com/tchupp/alpine-docker-engine-conflict

Additional Information

I only tested with the node-rdkafka. The indication that this is a NodeJS issue is that upgrading the docker engine version seems to have mitigated the issue for now.

@yosifkit
Copy link
Contributor

yosifkit commented Aug 14, 2021

Likely is caused by https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2.

So, newer Docker and libseccomp is the fix to be able to run containers based on Alpine 3.14 images.

Similar to docker-library/ruby#351 and docker-library/php#1177

@darshan1212
Copy link

@tchupp Thanks, for me, as I do not have permission to update docker engine, I lower node version from 20 to 19 and it worked fine.

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

No branches or pull requests

4 participants