1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/images
Brian Goff 88c0271605 Don't set default platform on container create
This fixes a regression based on expectations of the runtime:

```
docker pull arm32v7/alpine
docker run arm32v7/alpine
```

Without this change, the `docker run` will fail due to platform
matching on non-arm32v7 systems, even though the image could run
(assuming the system is setup correctly).

This also emits a warning to make sure that the user is aware that a
platform that does not match the default platform of the system is being
run, for the cases like:

```
docker pull --platform armhf busybox
docker run busybox
```

Not typically an issue if the requests are done together like that, but
if the image was already there and someone did `docker run` without an
explicit `--platform`, they may very well be expecting to run a native
version of the image instead of the armhf one.

This warning does add some extra noise in the case of platform specific
images being run, such as `arm32v7/alpine`, but this can be supressed by
explicitly setting the platform.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-10-20 20:17:23 +00:00
..
cache.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image.go Don't set default platform on container create 2020-10-20 20:17:23 +00:00
image_builder.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_commit.go
image_delete.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_events.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_exporter.go
image_history.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_import.go
image_inspect.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_prune.go API: add "prune" events 2020-07-28 12:41:14 +02:00
image_pull.go goimports: fix imports 2019-09-18 12:56:54 +02:00
image_push.go Revert "Remove the rest of v1 manifest support" 2019-06-18 00:36:01 +00:00
image_search.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
image_search_test.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
image_tag.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
image_unix.go
image_windows.go
images.go Accept platform spec on container create 2020-03-20 16:10:36 -07:00
locals.go goimports: fix imports 2019-09-18 12:56:54 +02:00
service.go Replace errors.Cause() with errors.Is() / errors.As() 2020-04-29 00:28:41 +02:00