In commit 47ac96155f the image name that is used
for setting the container name is taken from the resolved image
unless it is empty.
The image has the "Names" field and right now the first name is
taken. However, when the image is a tagged image, the container name
will end up using the original name instead of the given one.
For example:
$ buildah tag busybox busybox1
$ buildah from busybox1
Will set the name of the container as "busybox-working-container"
while it was expected to be "busybox1-working-container".
This patch fixes this particular issue.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #399
Approved by: rhatdan