Skip to content

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

Closed
@xRadne

Description

@xRadne

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions