Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When running imagebuilder with the following sample Dockerfile, copying a file in between stages is failing silently.
How reproducible: Always
Steps to Reproduce:
Run imagebuilder with the sample Dockerfile:
FROM openshift/origin-cli:v3.11 AS builder
RUN ls -l /bin/oc
# Multistage with python
FROM python:2.7.15 AS runner
# Bring oc binary to python image
COPY --from=builder /bin/oc /bin/
RUN ls -l /bin/oc
Actual results:
--> FROM openshift/origin-cli:v3.11 as builder
--> RUN ls -l /bin/oc
-rwxr-xr-x. 1 root root 120627192 Jul 5 15:09 /bin/oc
--> FROM python:2.7.15 as runner
--> COPY --from=builder /bin/oc /bin/
--> RUN ls -l /bin/oc
ls: cannot access '/bin/oc': No such file or directory
running 'ls -l /bin/oc' failed with exit code 2
Expected results:
The oc binary should be copied to the second stage
Additional info:
$ imagebuilder --version
1.1-dev
Note that the following dockerfile does work:
FROM openshift/origin-cli:v3.11 AS builder
RUN cp /bin/oc /
# Multistage with python
FROM python:2.7.15 AS runner
# Bring oc binary to python image
COPY --from=builder /oc /bin/
So copying the file into a new layer in the stage 0 image, makes it available to COPY --from in stage 1.
The main implication of this is it breaks ocp 3.11 multistage builds (which rely on imagebuilder under the covers).
I take it that this is not an issue with Buildah running the build but with the Docker.sock since this is openshift 3.11?
So not sure why this is assigned to Nalin?
It's not a buildah issue, it is an imagebuilder issue (it occurs both when running imagebuilder on the cli, as well as in OCP3.11 when builds use imagebuilder to build multistage dockerfiles).
Since the containers team owns imagebuilder(right?), it was assigned to that component... not sure who within the team is the right assignee.
Nalin's PR (https://github.com/openshift/origin/pull/23562) was closed in December of 2019. Nalin/Jindrich can we close this now? I don't believe there's any further packaging needs for this at this time.