moby--moby/api/server
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
..
backend/build API: add "prune" events 2020-07-28 12:41:14 +02:00
httputils api/server: use constants for http methods 2019-10-13 17:30:19 +02:00
middleware bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
router Add support for platform (os and architecture) on image import 2022-01-24 18:24:51 +01:00
middleware.go Add canonical import comment 2018-02-05 16:51:57 -05:00
server.go Remove unused router swapper 2019-09-04 13:50:03 -07:00
server_test.go api/server: use constants for http methods 2019-10-13 17:30:19 +02:00