moby--moby/builder
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
..
builder-next Builder: Check remote when local img platform doesn't match 2020-03-05 22:46:46 -08:00
dockerfile bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
dockerignore Fix typos 2020-02-10 20:59:04 +08:00
remotecontext bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
builder.go Windows: (WCOW) Generate OCI spec that remote runtime can escape 2019-03-12 18:41:55 -07:00