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

question regarding referencing intermediate stage in multi stage builds #25887

Open
jericbryledy opened this issue Feb 11, 2021 · 3 comments
Open
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@jericbryledy
Copy link

jericbryledy commented Feb 11, 2021

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
  1. 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'

  1. 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 .

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 16, 2021
@jericbryledy
Copy link
Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 16, 2021
@jericbryledy
Copy link
Author

/lifecycle frozen

@openshift-ci openshift-ci bot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

2 participants