1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/router
Sebastiaan van Stijn 01ae9525dd
Add support for platform (os and architecture) on image import
Commit 0380fbff37 added the ability to pass a
--platform flag on `docker import` when importing an archive. The intent
of that commit was to allow importing a Linux rootfs on a Windows daemon
(as part of the experimental LCOW feature).

A later commit (337ba71fc1) changed some
of this code to take both OS and Architecture into account (for `docker build`
and `docker pull`), but did not yet update the `docker image import`.

This patch updates the import endpoitn to allow passing both OS and
Architecture. Note that currently only matching OSes are accepted,
and an error will be produced when (e.g.) specifying `linux` on Windows
and vice-versa.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-24 18:24:51 +01: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 api/types: hostconfig: create enum for CgroupnsMode 2021-08-06 19:05:54 +02:00
debug Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
distribution Remove more of registry v1 code. 2021-02-23 09:49:46 +01:00
grpc grpc: make sure typed errors handler is installed 2021-04-26 22:38:59 -07:00
image Add support for platform (os and architecture) on image import 2022-01-24 18:24:51 +01:00
network Fix libnetwork imports 2021-06-01 21:51:23 +00: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 API: discard /system/df type parameter pre-1.42 2021-08-06 19:33:16 +02: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