Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Jul 27, 2020
Merged

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

merged 4 commits into from
Jul 27, 2020

Conversation

phracek
Copy link
Member

@phracek phracek commented Jul 23, 2020

[EDITED] This commit fixes an error in case of e.g. Fedora registry is not
accessible for a temporary reasons like HTTP 503.
Second pulling should work usually.

In case FROM scratch is used in Dockerfile then it is skipped.
In case FROM ubi8 as ubi-base is used in Dockerfile the ubi8 is pulled.

Signed-off-by: Petr "Stone" Hracek phracek@redhat.com

@phracek phracek requested review from pkubatrh and hhorak July 23, 2020 07:16
@phracek
Copy link
Member Author

phracek commented Jul 23, 2020

@phracek
Copy link
Member Author

phracek commented Jul 23, 2020

I have tested this pulling function on s2i-base-container and output seems to be fine:

s2i-base-container$ make test TARGET=fedora
Makefile:15: warning: overriding recipe for target 'core'
common/common.mk:81: warning: ignoring old recipe for target 'core'
make[1]: Entering directory '/vagrant/s2i-base-container'
Makefile:15: warning: overriding recipe for target 'core'
common/common.mk:81: warning: ignoring old recipe for target 'core'
VERSIONS="core" SKIP_SQUASH=1 UPDATE_BASE= OS=fedora CLEAN_AFTER= DOCKER_BUILD_CONTEXT=. OPENSHIFT_NAMESPACES="" CUSTOM_REPO="" /usr/bin/env bash common/build.sh
-> Version core: building image from 'Dockerfile.fedora' ...
-> Pulling image registry.fedoraproject.org/fedora:31 before building image from Dockerfile.fedora.
Trying to pull repository registry.fedoraproject.org/fedora ...
sha256:60cd711615e0983c533420634ba530283c14a26d875ab310964e2a5666ba957f: Pulling from registry.fedoraproject.org/fedora
c28ace6b0c4a: Retrying in 1 second

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 <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Jul 23, 2020

[test]

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
build.sh Outdated Show resolved Hide resolved
@pkubatrh pkubatrh self-assigned this Jul 24, 2020
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Jul 27, 2020

[test]

@pkubatrh
Copy link
Member

lgtm now, thanks!

@pkubatrh pkubatrh merged commit e65a5f5 into sclorg:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants