Show the right image name/ID in job log

When we tag an Image with several names and we run one of them,
The "create" job will log this event with
 +job log(create, containerID, Imagename).

And the "Imagename" is always the first one (sorted). It is the
same to "start/stop/rm" jobs. So use the correct name instand.
This PR refer to #10479

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Upstream-commit: 663d9130118548c648c4463bae088fd983099e08
Component: engine
This commit is contained in:
Liu Hua
2015-03-29 10:17:17 +08:00
parent f60fa17571
commit ac0bbebed0

View File

@ -203,7 +203,7 @@ func (container *Container) LogEvent(action string) {
d.EventsService.Log(
action,
container.ID,
d.Repositories().ImageName(container.ImageID),
container.Config.Image,
)
}