Skip to content

On WindowsPC, not build arm64 but amd64 #1317

@Yuhta28

Description

@Yuhta28

finch-support-20250309172011.zip

Describe the bug
I run finch on a Windows PC(x86_64) and try to build my Dockerfile in arm64 format with option --platform=64 and the container image is built in amd64 format even if I build with options.

Steps to reproduce

 uname -ms
Windows_NT x86_64 

 cat .\Dockerfile
FROM debian:stable-slim
RUN apt update && apt install -y curl ca-certificates gnupg

 finch build . -f .\Dockerfile -t finch-test:arm64 --platform=arm64
mux_client_request_session: read from master failed: Connection reset by peer
ControlSocket C:/Program Files/Finch/lima/data/finch/ssh.sock already exists, disabling multiplexing
[+] Building 2.3s (6/6) FINISHED
 => [internal] load build definition from Dockerfile                                                                         0.0s
 => => transferring dockerfile: 121B                                                                                         0.0s
 => [internal] load metadata for docker.io/library/debian:stable-slim                                                        1.5s
 => [internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 2B                                                                                              0.0s
 => [1/2] FROM docker.io/library/debian:stable-slim@sha256:5484adc33b4c352c5a9f4c4ae295fc49aed1cb54a7a0712a1b29674fb6f4f10f  0.0s
 => => resolve docker.io/library/debian:stable-slim@sha256:5484adc33b4c352c5a9f4c4ae295fc49aed1cb54a7a0712a1b29674fb6f4f10f  0.0s
 => CACHED [2/2] RUN apt update && apt install -y curl ca-certificates gnupg                                                 0.0s
 => exporting to image                                                                                                       0.6s
 => => exporting layers                                                                                                      0.0s
 => => exporting manifest sha256:f1ba36fc1d1822524dae29985f0ef6f862d0d44bca0eeb7304ad02c65306670a                            0.0s
 => => exporting config sha256:f0b4db78fd4815d1c8b32528850f9a33d7eb1918607ac596e6b32b10b6be8f2f                              0.0s
 => => naming to docker.io/library/finch-test:arm64                                                                          0.0s
 => => unpacking to docker.io/library/finch-test:arm64            

 finch image ls
mux_client_request_session: read from master failed: Connection reset by peer
ControlSocket C:/Program Files/Finch/lima/data/finch/ssh.sock already exists, disabling multiplexing
REPOSITORY    TAG      IMAGE ID        CREATED           PLATFORM       SIZE       BLOB SIZE
finch-test    arm64    f1ba36fc1d18    19 seconds ago    linux/amd64    130.9MB    53.44MB

Expected behavior
I was expecting a contaimer image in arm64 format to be built.

finch image ls
mux_client_request_session: read from master failed: Connection reset by peer
ControlSocket C:/Program Files/Finch/lima/data/finch/ssh.sock already exists, disabling multiplexing
REPOSITORY    TAG      IMAGE ID        CREATED           PLATFORM       SIZE       BLOB SIZE
finch-test    arm64    f1ba36fc1d18    19 seconds ago    linux/arm64    130.9MB    53.44MB

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.

Additional context
Strangely enough, when I run a container image that has been saved directly to the registry using the run command, an arm64 container was launched.

finch run --rm --platform=arm64 public.ecr.aws/amazonlinux/amazonlinux uname -ms
mux_client_request_session: read from master failed: Connection reset by peer
ControlSocket C:/Program Files/Finch/lima/data/finch/ssh.sock already exists, disabling multiplexing
public.ecr.aws/amazonlinux/amazonlinux:latest:                                    resolved       |++++++++++++++++++++++++++++++++++++++|
index-sha256:558e465c865f94ba15dd832dfa418eb21e2a954dac7d5e542ac1fee146b7675c:    done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:a4c24d335f1a0742bbab3211c2afd6265f2f312f32f31af33b08e4a5d186730b: done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:947f030348d9537ae55196975cf5930f93a9dd33ce8eb2f7d2e5a5b8d740cc11:   done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:a8ae4757b69337068f85c03c42e1020f67d8e126d57f500162c47221848c93bd:    done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 5.2 s                                                                    total:  49.8 M (9.6 MiB/s)

Linux aarch64

 finch image ls
mux_client_request_session: read from master failed: Connection reset by peer
ControlSocket C:/Program Files/Finch/lima/data/finch/ssh.sock already exists, disabling multiplexing
REPOSITORY                                TAG       IMAGE ID        CREATED           PLATFORM       SIZE       BLOB SIZE
public.ecr.aws/amazonlinux/amazonlinux    latest    558e465c865f    30 seconds ago    linux/arm64    198.1MB    52.25MB

To help debug the issue as quickly as possible, we recommend generating a support bundle with finch support-bundle generate and attaching it to this issue. This packages all Finch-related configs and logs into one file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    vmvm specific

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions