Fix docker run for 64 byte hex ID
Fixes #20972 Also makes sure there is no check to registry if no image is found for the prefixed IDs. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> Upstream-commit: 16e4c4e481aca8d5a99d5a4760b5d27bf5bbb9fd Component: engine
This commit is contained in:
@ -450,3 +450,11 @@ func (s *DockerSuite) TestCreateWithInvalidLogOpts(c *check.C) {
|
||||
out, _ = dockerCmd(c, "ps", "-a")
|
||||
c.Assert(out, checker.Not(checker.Contains), name)
|
||||
}
|
||||
|
||||
// #20972
|
||||
func (s *DockerSuite) TestCreate64ByteHexID(c *check.C) {
|
||||
out := inspectField(c, "busybox", "Id")
|
||||
imageID := strings.TrimPrefix(strings.TrimSpace(string(out)), "sha256:")
|
||||
|
||||
dockerCmd(c, "create", imageID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user