-
Notifications
You must be signed in to change notification settings - Fork 792
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
ARG does not get expanded in a COPY --from directive #2496
Comments
AFAICT, the relevant code in imagebuilder (updated in the commit resolving #2192, i.e. buildah/imagebuildah/executor.go Line 491 in 03d782c
CC: @nalind who may know more about this as they added the TODOs |
@aoikonomopoulos it is indeed sort of related to #2192, but the issue is at this line: |
https://github.com/containers/buildah/blob/master/imagebuildah/stage_executor.go#L889 (Not sure how I managed to end the prior comment so quickly). At this line we have the variable name ${toolchain_name} that has yet to be resolved. We do that resolution down in the ImageBuilder code. However, at this line in the stage_executor we're telling the code to look for the stage called Now I need to figure out how to resolve that here rather than ImageBuilder, an excercise that I'll leave until tomorrow when I'm not fighting with my eyelids quite as much. |
When an argument was passed into "COPY --from" command in a Containerfile like COPY --from=${toolchainname} The argument was never resolved to the value that it had been set to. Addresses: containers#2496 It may also address containers#2404 but I've not yet tested. Signed-off-by: TomSweeneyRedHat <[email protected]>
When an argument was passed into "COPY --from" command in a Containerfile like COPY --from=${toolchainname} The argument was never resolved to the value that it had been set to. Addresses: containers#2496 It may also address containers#2404 but I've not yet tested. Signed-off-by: TomSweeneyRedHat <[email protected]>
When an argument was passed into "COPY --from" command in a Containerfile like COPY --from=${toolchainname} The argument was never resolved to the value that it had been set to. Addresses: containers#2496 It may also address containers#2404 but I've not yet tested. Signed-off-by: TomSweeneyRedHat <[email protected]>
2522: Handle COPY --from when an argument is used r=rhatdan a=TomSweeneyRedHat When an argument was passed into "COPY --from" command in a Containerfile like COPY --from=${toolchainname} The argument was never resolved to the value that it had been set to. Addresses: #2496 It may also address #2404 but I've not yet tested. Signed-off-by: TomSweeneyRedHat <[email protected]> <!-- Thanks for sending a pull request! Please make sure you've read and understood our contributing guidelines (https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring that all your commits are signed with `git commit -s`. --> #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> > /kind api-change > /kind bug > /kind cleanup > /kind deprecation > /kind design > /kind documentation > /kind failing-test > /kind feature > /kind flake > /kind other #### What this PR does / why we need it: #### How to verify it #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> <!-- Fixes # or None --> #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` Co-authored-by: TomSweeneyRedHat <[email protected]>
Fixed with #2522 |
Description
This seems pretty similar to #2192; With the Dockerfile
buildah bud
command fails with:whereas it works when using
docker build
.Steps to reproduce the issue:
Describe the results you received:
toolchain_name
not expanded.Describe the results you expected:
toolchain_name
expanded toexisting_image_2
.Output of
rpm -q buildah
Output of
buildah version
:Tried both with the fedora package
and with the latest git (as of a few minutes ago):
Output of
cat /etc/*release
:Output of
uname -a
:The text was updated successfully, but these errors were encountered: