1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/builder-next
Brian Goff ed033adb2c Builder: Check remote when local img platform doesn't match
This fixes an issue where if a build requests an image that already
exists in Docker's image store but does not match the specified build
platform, instead of building using the wrong platform go ahead and
check the remote for the correct platform.

Steps to reproduce issue:

```terminal
$ docker pull --platform=amd64 debian:buster
<output supressed>
$ cat Dockerfile
FROM debian:buster
RUN echo hello
$ docker build --platform=armhf -< Dockerfile
<output supressed>
```

Without this fix, the build invokcation will build using the amd64 image
since it is already tagged locally, but this is clearly not what we
want.

With the fix the local image is not used and instead we pull the correct
image.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-05 22:46:46 -08:00
..
adapters Builder: Check remote when local img platform doesn't match 2020-03-05 22:46:46 -08:00
exporter builder-next: explicitely ignore unhandled errors (errcheck) 2019-09-18 12:57:47 +02:00
imagerefchecker builder-next: clear temp leases on startup 2019-11-05 12:50:41 -08:00
worker vendor containerd, BuildKit, protobuf, grpc, and golang.org/x 2020-03-03 10:25:20 +09:00
builder.go builder-next: update adapters to new buildkit interfaces 2019-11-05 10:14:33 -08:00
controller.go vendor containerd, BuildKit, protobuf, grpc, and golang.org/x 2020-03-03 10:25:20 +09:00
executor_unix.go daemon: Use short libnetwork ID in exec-root & update libnetwork 2019-10-15 11:40:24 +01:00
executor_windows.go build: buildkit now honors daemon's DNS config 2019-07-10 00:26:03 +00:00
reqbodyhandler.go builder-next: use constants for http status codes 2019-10-13 19:11:24 +02:00