mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
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>
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