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

node:slim tag updated and exec /bin/sh: no such file or directory #1913

Closed
pacoxu opened this issue Jun 13, 2023 · 4 comments
Closed

node:slim tag updated and exec /bin/sh: no such file or directory #1913

pacoxu opened this issue Jun 13, 2023 · 4 comments

Comments

@pacoxu
Copy link

pacoxu commented Jun 13, 2023

Version

node:slim

Platform

x86

Subsystem

No response

What steps will reproduce the bug?

https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227

See kubernetes/kubeadm#2892

Build image based on node:slim like https://github.com/ben-z/actions-comment-on-issue/blob/1.0.2/Dockerfile

FROM node:slim

COPY . .

RUN npm install --production

ENTRYPOINT ["node", "/lib/main.js"]

How often does it reproduce? Is there a required condition?

docker build failed

Step 1/4 : FROM node:slim
  slim: Pulling from library/node
  5b5fe70539cd: Pulling fs layer
  b[6](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:6)b4ba8b66ef: Pulling fs layer
  dc3acd1165f9: Pulling fs layer
  56[7](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:7)2c64b5e46: Pulling fs layer
  ea5d3a7fd2f9: Pulling fs layer
  5672c64b5e46: Waiting
  ea5d3a7fd2f9: Waiting
  b6b4ba[8](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:8)b66ef: Verifying Checksum
  b6b4ba8b66ef: Download complete
  5b5fe7053[9](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:9)cd: Verifying Checksum
  5b5fe70539cd: Download complete
  dc3acd1165f9: Verifying Checksum
  dc3acd1165f9: Download complete
  5672c64b5e46: Verifying Checksum
  5672c64b5e46: Download complete
  ea5d3a7fd2f9: Verifying Checksum
  ea5d3a7fd2f9: Download complete
  5b5fe70539cd: Pull complete
  b6b4ba8b66ef: Pull complete
  dc3acd1165f9: Pull complete
  5672c64b5e46: Pull complete
  ea5d3a7fd2f9: Pull complete
  Digest: sha256:c0a80bc11d7cd2427092476664c2255462a4a5e331d7877[10](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:10)4b7c7e240efc577
  Status: Downloaded newer image for node:slim
   ---> a654fa76705d
  Step 2/4 : COPY . .
   ---> 5a625cb[21](https://github.com/kubernetes/kubeadm/actions/runs/5253514168/jobs/9490939227#step:2:21)a6f
  Step 3/4 : RUN npm install --production
   ---> Running in d3bfe82b74c5
  exec /bin/sh: no such file or directory
  The command '/bin/sh -c npm install --production' returned a non-zero code: 1

What is the expected behavior? Why is that the expected behavior?

/bin/sh should be available as before in node:slim

What do you see instead?

Should we re-build node:slim? Or this is expected.

Additional information

No response

@targos targos transferred this issue from nodejs/node Jun 13, 2023
@yosifkit
Copy link
Contributor

This sounds similar to #1780 (comment); Try updating libseccomp and docker on the host (or use an updated GitHub actions runner based on Ubuntu 22.04 or ubuntu-latest).

@pacoxu
Copy link
Author

pacoxu commented Jun 14, 2023

or use an updated GitHub actions runner based on Ubuntu 22.04 or ubuntu-latest

https://github.com/pacoxu/kubeadm/actions/runs/5262027594/jobs/9510796914

I tried to use ubuntu-22.04. But the docker build still failed for the same reason.

BTW, the old node:buster-slim or old node:20.2.0-slim can work.

@yosifkit
Copy link
Contributor

Ah, it is because of an unsafe Dockerfile: ben-z/actions-comment-on-issue#3 (comment)

@pacoxu
Copy link
Author

pacoxu commented Jun 15, 2023

Per ben-z/actions-comment-on-issue#3 (comment).

Adding workdir fixed the issue.

@pacoxu pacoxu closed this as completed Jun 15, 2023
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

2 participants