You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM mcr.microsoft.com/windows/servercore:ltsc2019
RUN echo "Hello World"
I run into the error:
> docker buildx build --builder buildkit-exp -f dockerfile .
[+] Building 1.1s (5/5) FINISHED remote:buildkit-exp
=> [internal] load build definition from dockerfile 0.0s
=> => transferring dockerfile: 117B 0.0s
=> [internal] load metadata for mcr.microsoft.com/windows/servercore:ltsc2019 0.3s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/2] FROM mcr.microsoft.com/windows/servercore:ltsc2019@sha256:41f42aa4ad39d85e4d30642b8111ca6454ca2275f188f012934b9afbaf63a647 0.0s
=> => resolve mcr.microsoft.com/windows/servercore:ltsc2019@sha256:41f42aa4ad39d85e4d30642b8111ca6454ca2275f188f012934b9afbaf63a647 0.0s
=> ERROR [2/2] RUN echo "Hello World" 0.7s
------
> [2/2] RUN echo "Hello World":
------
WARNING: No output specified with remote driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
dockerfile:4
--------------------
2 |
3 |
4 | >>> RUN echo "Hello World"
5 |
--------------------
ERROR: failed to solve: process "cmd /S /C echo \"Hello World\"" did not complete successfully: failed to create shim task: hcs::CreateComputeSystem m6ojaf50wxzk08w9fxmgxkirk: The container operating system does not match the host operating system.: unknown
View build details: docker-desktop://dashboard/build/buildkit-exp/buildkit-exp0/pvm53zkf086dsgwafmsq0untr
I get the same error if I use ltsc2022
Any tips or tricks on how to build simple Windows Container?
I am able to do so using the normal docker build:
> docker build -f dockerfile .
Sending build context to Docker daemon 637.4kB
Step 1/2 : FROM mcr.microsoft.com/windows/servercore:ltsc2019
---> b51a50ce03f1
Step 2/2 : RUN echo "Hello World"
---> Running in 3c6c10e36e01
"Hello World"
---> Removed intermediate container 3c6c10e36e01
---> a0c0f7995b32
Successfully built a0c0f7995b32
The text was updated successfully, but these errors were encountered:
Enviorment
When trying to run a very simple docker file:
I run into the error:
I get the same error if I use ltsc2022
Any tips or tricks on how to build simple Windows Container?
I am able to do so using the normal docker build:
The text was updated successfully, but these errors were encountered: