mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
b7a2d85316
With the switchover to the unified reference package, AddReference no longer does the right thing when passed a reference that has both a digest and a tag. It would put both the digest in the tag in the reference stored in the repositories.json file, which isn't the right format, and would mean that neither "docker run" nor docker services could locate the image. This meant that a simple "docker service create" command like "docker service create --name foo busybox top" would create a service that immediately went into a restart loop, because it couldn't use the image that had been pulled. Fix AddReference to strip out the tag when both a tag and digest are specified. We do this because we don't necessarily want to overwrite the tag - when both a digest and tag are specified, the tag is only advisory. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com> |
||
---|---|---|
.. | ||
store.go | ||
store_test.go |