Fixes #138 #158. Pull image before building image (#159)
Fixes #138 #158. Pull image before building image (#159)

* Fixes #138 #158. Pull image before building image

This commit fixes error in case of e.g. Fedora registry is not
accessible for temporary reason like HTTP 503.
Second pulling should work usually.

Signed-off-by: Petr "Stone" Hracek <5ec98b824b3d06300936ce230b04e9851e98fc96@redhat.com>

* Check if docker image is not already pulled.

Signed-off-by: Petr "Stone" Hracek <5ec98b824b3d06300936ce230b04e9851e98fc96@redhat.com>

* remove duplicate code and check docker images for already pulled image

Signed-off-by: Petr "Stone" Hracek <5ec98b824b3d06300936ce230b04e9851e98fc96@redhat.com>

* Move image_name definition and check if equals to scratch

Signed-off-by: Petr "Stone" Hracek <5ec98b824b3d06300936ce230b04e9851e98fc96@redhat.com>
sclorg/container-common-scripts,sclorg/container-common-scripts