DockerStartegy build failed to pull a image which is specified FROM in Dockerfile
Issue
- The
build
failed randomly with the followingbuild
logs when you build usingDockerStrategy
.
Pulling image docker-registry.default.svc:5000/build-test/base ...
Step 1 : FROM docker-registry.default.svc:5000/build-test/base
Trying to pull repository docker-registry.default.svc:5000/build-test/base ...
Pulling repository docker-registry.default.svc:5000/build-test/base
error: build error: Error: image build-test/base:latest not found
docker-registry
pod logs are as follows when the error is occurred.
10.129.0.1 - - [19/Nov/2018:23:25:11 +0000] "GET /v1/repositories/build-test/base/images HTTP/1.1" 404 19 "" ...
time="2018-11-19T23:25:11.266178774Z" level=debug msg="authorizing request" go.version=go1.8.3 http.request.host="docker-registry.default.svc:5000" ...
time="2018-11-19T23:25:11.266274214Z" level=error msg="error authorizing context: authorization header required ...
- If you specify the customized
image
toFROM
, the build is failed to pull theimage
.
Environment
- OpenShift Container Platform
- 3.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.