question regarding referencing intermediate stage in multi stage builds
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 4.8k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 53
Description
How to build (using BuildConfig) with a Dockerfile with multi stage referencing to a previous stage? I tried building a multi staged Dockerfile on my local machine and it works. The same file fails on openshift, because openshift tries to download the images as an external image, even though some of the image are intermediate image from previous stage
Version
oc v3.9.43
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth
Steps To Reproduce
- create a valid multi staged Dockerfile with reference to previous stage, example:
FROM alpine:latest as stage0
RUN echo 'do something'
FROM alpine:latest as stage1
RUN echo 'do something else'
FROM stage0
RUN echo 'do something else again'
- build
Current Result
Pulling image stage0 ...
error: build error: failed to pull image: Get https://....: unauthorized: authentication required
error: the build ... status is "Failed"
Expected Result
should build successfully, like running:
docker build .
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the BuildConfig build path and the handling of FROM references in the supplied multi-stage Dockerfile. Reproduce the failure using the listed oc version and Dockerfile, compare it with docker build ., and consider the work done when the previous stage is treated as an intermediate image rather than pulled externally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100