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

RUN <anything> returned a non-zero code #1612

Closed
xRadne opened this issue Nov 30, 2021 · 2 comments
Closed

RUN <anything> returned a non-zero code #1612

xRadne opened this issue Nov 30, 2021 · 2 comments

Comments

@xRadne
Copy link

xRadne commented Nov 30, 2021

Environment

  • Platform: Windows 10
  • Docker Version: Docker version 20.10.10, build b485636
  • Node.js Version: 14
  • Image Tag: node:14

Expected Behavior

Current Behavior

Any RUN command gives me an error: The command '/bin/sh -c node -v || 0' returned a non-zero code: 4294967295

However the run has been executed

Possible Solution

Since the output gives me this warning about platform, I'm assuming it has to do with the host running windows somehow, but I could not find anything on stackoverflow or here.

Step 2/2 : RUN node -v
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested

Steps to Reproduce

Running docker build . using this Dockerfile :

FROM node:14 as client-builder
RUN node -v
RUN echo "Why did the build stop before this line?"

(Also tested node:12 as well)
(RUN node -v || 0 did not help the return code)

Additional Information

Full error output:

docker build . 
Sending build context to Docker daemon  1.446GB
Step 1/2 : FROM node:14 as client-builder
 ---> 4c0767d61943
Step 2/2 : RUN node -v || 0
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested
 ---> Running in b101d3fdb6e1
v14.18.1
The command '/bin/sh -c node -v || 0' returned a non-zero code: 4294967295: failed to shutdown container: container b101d3fdb6e191e9084d833387b7f1f56162f53defce67233165d98d4dfc4587 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container b101d3fdb6e191e9084d833387b7f1f56162f53defce67233165d98d4dfc4587 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
@yosifkit
Copy link
Contributor

yosifkit commented Dec 2, 2021

I think you need to switch Docker Desktop to use Linux containers, rather than Windows containers.

@xRadne
Copy link
Author

xRadne commented Dec 2, 2021

Aaah, I see, I thought I could run this in windows container as well (which is what I need).

I found this PR #362 for node in windows containers.

@xRadne xRadne closed this as completed Dec 2, 2021
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