Closed
Description
I'm using the Buildkit version that comes bundled with Docker for Windows 18.06.1 and am experiencing some trouble running it with Windows containers. In the log below you can see a build succeed for a very simple build running without Buildkit and then failing once I enable it. The localized error message "Det går inte att hitta filen" roughly translates to "Unable to find the file". I've had success running Buildkit on the same system when running Linux containers. A minimal project that reproduces the error can be found here test.zip.
PS C:\test> docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:21:34 2018
OS/Arch: windows/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.24)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:36:40 2018
OS/Arch: windows/amd64
Experimental: true
PS C:\test> ls
Directory: C:\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2018-09-11 15:38 74 Dockerfile
-a---- 2018-09-11 15:39 23 test.txt
PS C:\test> type .\Dockerfile
FROM microsoft/nanoserver:1803
COPY test.txt /test.txt
RUN type test.txt
PS C:\test> $Env:DOCKER_BUILDKIT=0
PS C:\test> docker build -t test .
Sending build context to Docker daemon 3.072kB
Step 1/3 : FROM microsoft/nanoserver:1803
---> 693ff1719e39
Step 2/3 : COPY test.txt /test.txt
---> 3cb8bc9e5e2e
Step 3/3 : RUN type test.txt
---> Running in 376f873629fd
This is a test message!Removing intermediate container 376f873629fd
---> 0cce47564a2d
Successfully built 0cce47564a2d
Successfully tagged test:latest
PS C:\test> $Env:DOCKER_BUILDKIT=1
PS C:\test> docker build -t test .
[+] Building 0.2s (2/2) FINISHED
=> local://dockerfile (Dockerfile) 0.1s
=> => transferring dockerfile: 31B 0.0s
=> local://context (.dockerignore) 0.1s
=> => transferring context: 2B 0.0s
failed to read dockerfile: open C:\ProgramData\Docker\tmp\buildkit-mount977689469\Dockerfile: Det går inte att hitta filen.