moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.22k stars 1.16k forks source link

Windows buildkit: copy context error #4918

Open HeikoNardmann opened 6 months ago

HeikoNardmann commented 6 months ago

On Windows 11 with docker engine v26.1.0 and buildx v0.14.0 inside cmd I run the following:

set DOCKER_BUILDKIT=1
tar cf - Dockerfile | docker build -f Dockerfile -

That gives me

#0 building with "default" instance using docker driver

#1 [internal] load remote build context
#1 DONE 1.7s

#1 [internal] load remote build context
#1 CACHED

#2 copy /\context /
#2 ERROR: cleaning source path: removing drive letter: UNC paths are not supported
------
 > copy /\context /:
------
ERROR: failed to solve: failed to read dockerfile: cleaning source path: removing drive letter: UNC paths are not supported

Any idea?

tonistiigi commented 6 months ago

What's the contents of your Dockerfile?

It's hard to understand what you are trying to achieve as well as you are creating file as Dockerfile but then passing Dockerfile.windows.build.qt-6.5.5-static as filename, although that looks unrelated to the error.

Fill in the version/architecture/how you are running buildkit info as requested by the template. If you are building windows containers (not windows client building linux containers) then this is not supported by DOCKER_BUILDKIT=1 atm.

HeikoNardmann commented 6 months ago

Sorry, the mismatching Dockerfile name has been due to my incomplete preparation for the ticket report. Fixed above.

Not sure what you mean with version (in my opinioin already given by 26.1.0 and 0.14.0), architecture (Windows 11).

Yes, I'm trying to build a Windows container: otherwise I wonder what that Windows buildx 0.14.0 can be used for ... ?

HeikoNardmann commented 6 months ago

Sorry, the mismatching Dockerfile name has been due to my incomplete preparation for the ticket report. Fixed above.

Not sure what you mean with version (in my opinion already given by 26.1.0 and 0.14.0), architecture (Windows 11).

Yes, I'm trying to build a Windows container: otherwise I wonder what that Windows buildx 0.14.0 can be used for ... ?

profnandaa commented 6 months ago

@HeikoNardmann -- which guide are you following, this (set DOCKER_BUILDKIT=1) looks like for LCOW scenario? Also share your Dockerfile content if possible (can remove any personal info).

Could you follow this? https://docs.docker.com/build/buildkit/#buildkit-on-windows

HeikoNardmann commented 6 months ago

No, I want to create a Windows container on a Windows system using buildkit. Therefore I've navigated to buildx and followed the instructions there. Or am I maybe completely wrong here?

profnandaa commented 6 months ago

Ok, please share your repro dockerfile.