Skip to content

Build with multiple platform and stdin crashes #2193

@JHeilCoveo

Description

@JHeilCoveo

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When using stdin - and multiple platforms it crashes with the following error failed to solve: failed to read dockerfile: no local sources enabled.

Expected behaviour

Not to crash

Actual behaviour

Crash with following error:

[+] Building 0.4s (3/3) FINISHED                                                                                                                                                                                                                                               kubernetes:buildx-jheil
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                      0.3s
 => => transferring dockerfile: 50B                                                                                                                                                                                                                                                                                       0.3s
 => ERROR [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                0.0s
 => => transferring dockerfile:                                                                                                                                                                                                                                                                                           0.3s
 => CANCELED [internal] load .dockerignore                                                                                                                                                                                                                                                                                0.0s
 => => transferring context:                                                                                                                                                                                                                                                                                              0.0s
------
 > [internal] load build definition from Dockerfile:
------
ERROR: failed to solve: failed to read dockerfile: no local sources enable

Buildx version

github.com/docker/buildx v0.12.1 30feaa1

Docker info

Builders list

buildx-jheil           kubernetes
  buildx-jheil-amd64   kubernetes:///buildx-jheil?deployment=buildx-jheil-amd64&kubeconfig=%2Fhome%2Fjheil%2F.config%2Fdeployment_pipeline%2Fbuildx-jheil%2Fkubeconfig.yaml       running  v0.12.4              linux/amd64*, linux/amd64/v2, linux/amd64/v3, linux/386
  buildx-jheil-arm64   kubernetes:///buildx-jheil?deployment=buildx-jheil-arm64&kubeconfig=%2Fhome%2Fjheil%2F.config%2Fdeployment_pipeline%2Fbuildx-jheil%2Fkubeconfig.yaml       running  v0.12.4              linux/arm64*, linux/arm/v7, linux/arm/v6

Configuration

FROM scratch

Build logs

[+] Building 0.4s (3/3) FINISHED                                                                                                                                                                                                                                               kubernetes:buildx-jheil
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                      0.3s
 => => transferring dockerfile: 50B                                                                                                                                                                                                                                                                                       0.3s
 => ERROR [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                0.0s
 => => transferring dockerfile:                                                                                                                                                                                                                                                                                           0.3s
 => CANCELED [internal] load .dockerignore                                                                                                                                                                                                                                                                                0.0s
 => => transferring context:                                                                                                                                                                                                                                                                                              0.0s
------
 > [internal] load build definition from Dockerfile:
------
ERROR: failed to solve: failed to read dockerfile: no local sources enable

Additional info

Minimal reproduction

echo 'FROM scratch' | docker buildx --builder buildx-jheil build --platform linux/amd64,linux/arm64 --load -

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions