user16908085
user16908085

Reputation: 105

How to build self-hosted devops agent in Docker locally

I have followed these steps and when I run PS C:\dockeragent> docker build -t dockeragent:latest .

I get

[+] Building 0.8s (3/3) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 31B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => ERROR [internal] load metadata for mcr.microsoft.com/windows/servercore:ltsc2019                               0.7s
------
 > [internal] load metadata for mcr.microsoft.com/windows/servercore:ltsc2019:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:etcetc: not found

I am using VSC with Docker extention on my local computer. How can I build this image?

Upvotes: 1

Views: 256

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35099

From the log, the image is build from a windows image(windows/servercore:ltsc2019).

You need to check if the docker desktop on your local machine is running on Windows containers.

If no, you need to switch it to Windows containers.

Upvotes: 1

Related Questions