moby/api/server/router
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
..
build api/server: build: refactor for better readability 2019-12-04 16:19:01 +01:00
checkpoint Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
container Don't set default platform on container create 2020-10-20 20:17:23 +00:00
debug Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
distribution goimports: fix imports 2019-09-18 12:56:54 +02:00
grpc api: add undocumented /grpc endpoint to talk to GRPC services 2019-04-02 19:57:59 +00:00
image API: remove deprecated "filter" parameter for API v1.41 and up 2020-02-10 17:21:01 +01:00
network api/types: remove errdefs dependency 2020-06-04 12:14:16 +02:00
plugin api: normalize comment formatting 2019-11-27 15:37:30 +01:00
session move /session api endpoint out of experimental 2018-08-21 22:43:34 +00:00
swarm Add ulimits support to services 2020-07-29 02:09:06 +02:00
system Merge pull request #39816 from tao12345666333/rm-systeminfo-error-handler 2020-03-13 01:59:13 +09:00
volume Rely on request.Context() cancellation 2018-11-27 17:06:31 -08:00
experimental.go fix typos 2018-09-01 21:26:38 +08:00
local.go api/server/router: use consts for HTTP methods 2019-11-26 21:55:29 +01:00
router.go Add canonical import comment 2018-02-05 16:51:57 -05:00