openshift / openshift/source-to-image
--as-dockerfile doesn't read builder image labels labels
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.5k
- Forks
- 701
- PR merge metrics
- No merged PRs in 30d
Description
It seems that s2i build --as-dockerfile doesn't read the builder image labels when generating the Dockerfile, especially the io.openshift.s2i.* ones.
As an example, see this gist. The image use in there registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift.
skopeo inspect docker://registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift | grep io.openshift.s2i
"io.openshift.s2i.destination": "/tmp",
"io.openshift.s2i.scripts-url": "image:///usr/local/s2i",
When trying to build the generated Dockerfile from this builder, it fails as it is looking at it tries to execute a RUN on /usr/libexec/s2i/assemble, which doesn't exists in that image.
STEP 6: USER 1001
--> 496bfb3d9130701e154304c2b444788fc6110780b26adc71620315b3d440a8b2
STEP 7: RUN /usr/libexec/s2i/assemble
/bin/sh: /usr/libexec/s2i/assemble: No such file or directory
subprocess exited with status 127
subprocess exited with status 127
error building at STEP "RUN /usr/libexec/s2i/assemble": exit status 127
Related to https://github.com/openshift/source-to-image/issues/966#issuecomment-495169765.
cc @siamaksade @rhuss
Contributor guide
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 s2i build --as-dockerfile entry point and the handling of builder-image labels, reproducing the issue with the image and skopeo inspect example in this report. Done means the generated Dockerfile uses the builder's io.openshift.s2i.* labels, including its scripts location, and builds without trying to run the wrong assemble path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100