Accept platform spec on container create

This enables image lookup when creating a container to fail when the
reference exists but it is for the wrong platform. This prevents trying
to run an image for the wrong platform, as can be the case with, for
example binfmt_misc+qemu.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2020-03-19 13:54:48 -07:00
parent 30d54e64f6
commit 7a9cb29fb9
28 changed files with 188 additions and 62 deletions

View File

@@ -65,7 +65,7 @@ func (s *DockerSuite) TestContainersAPICreateMountsBindNamedPipe(c *testing.T) {
},
},
},
nil, name)
nil, nil, name)
assert.NilError(c, err)
err = client.ContainerStart(ctx, name, types.ContainerStartOptions{})