Docker Community Forums

Share and learn in the Docker community.

Build fails using LCOW, but succeeds otherwise

build

(Mjmiller) #1

I’ve boiled this down to a small repro case. RUN fails with an error when LCOW is enabled. If I’m running on the older Hyper-V model it works. I’ve removed all images in between runs.

With LCOW

c:\foo > type .\dockerfile
FROM ubuntu
RUN echo hello

c:\foo > docker build .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ubuntu
latest: Pulling from library/ubuntu
660c48dd555d: Pull complete
4c7380416e78: Pull complete
421e436b5f80: Pull complete
e4ce6c3651b3: Pull complete
be588e74bd34: Pull complete
Digest: sha256:7c67a2206d3c04703e5c23518707bdd4916c057562dd51c74b99b2ba26af0f79
Status: Downloaded newer image for ubuntu:latest
 ---> 20c44cd7596f
Step 2/2 : RUN echo hello
 ---> Running in b92639b24bb8
hello
The command '/bin/sh -c echo hello' returned a non-zero code: 4294967295

Without LCOW

c:\foo > type .\dockerfile
FROM ubuntu
RUN echo hello

c:\foo > docker build .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ubuntu
latest: Pulling from library/ubuntu
660c48dd555d: Pull complete
4c7380416e78: Pull complete
421e436b5f80: Pull complete
e4ce6c3651b3: Pull complete
be588e74bd34: Pull complete
Digest: sha256:7c67a2206d3c04703e5c23518707bdd4916c057562dd51c74b99b2ba26af0f79
Status: Downloaded newer image for ubuntu:latest
 ---> 20c44cd7596f
Step 2/2 : RUN echo hello
 ---> Running in 9ed3e39c11a8
hello
Removing intermediate container 9ed3e39c11a8
 ---> c4c95811a655
Successfully built c4c95811a655
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.