Based on https://github.com/projectatomic/skopeo/pull/289 by Erik Hollensbe <github@hollensbe.org> Signed-off-by: Miloslav Trmač <mitr@redhat.com>