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

multistage build: cannot reference alias from previous stage(s) #1571

Closed
j-ogas opened this issue Feb 21, 2023 · 1 comment · Fixed by #1581
Closed

multistage build: cannot reference alias from previous stage(s) #1571

j-ogas opened this issue Feb 21, 2023 · 1 comment · Fixed by #1581
Assignees
Milestone

Comments

@j-ogas
Copy link
Contributor

j-ogas commented Feb 21, 2023

Reproducer:

FROM alpine as a
RUN echo foo

FROM a as b
RUN echo bar

FROM b
RUN echo qux

Expected behavior: image builds without issue.

Actual behavior:

$ ch-image build -t multi .
  1. FROM alpine AS a
[...]
  4. FROM a AS b
error: unauthorized or not in registry: registry-1.docker.io:443/library/a:latest
hint: if your registry needs authentication, use --auth

It appears to fail for one or more of the following reasons: (1) the tag has :latest appended by default, (2) ch-image does store images in storage with their alias, i.e., there is no a, b, or c in storage; rather there is multi_stage0, etc., and (3) ch-image doesn't check if the FROM argument matches an previous stage image alias.

@reidpr
Copy link
Collaborator

reidpr commented Mar 24, 2023

Closed by PR #1581.

@reidpr reidpr closed this as completed Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants