OpenLiberty / OpenLiberty/ci.docker
Improve Dockerfiles for a more seamless experience customizing for hotspot
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 48
- Forks
- 60
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 3
Description
A user reached out to me asking how to build a Hotspot based image for Open Liberty. They needed to use Java Flight Recorder which isn't part of OpenJ9. I had hoped that it would be as simple as cloning our repository and updating the FROM line from an ibm-semeru-runtimes image to eclipse-termurin one, however when I did this I got the following error:
STEP 17/22: RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache && chown -R 1001:0 /opt/ol/wlp/output && chmod -R g+rwx /opt/ol/wlp/output
Error: error building at STEP "RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache && chown -R 1001:0 /opt/ol/wlp/output && chmod -R g+rwx /opt/ol/wlp/output": error while running runtime: exit status 1
I was using this Dockerfile https://github.com/OpenLiberty/ci.docker/blob/main/releases/22.0.0.6/full/Dockerfile.ubuntu.openjdk11 but I think the issue would occur elsewhere.
This was simply fixed by updating OPENJ9_SCC to false on line 8. However I think it would be better if we update populate_scc so it doesn't fail on Hotspot, it would make this experience simpler for users.
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 releases/22.0.0.6/full/Dockerfile.ubuntu.openjdk11, especially the OPENJ9_SCC setting and the populate_scc invocation, then locate the populate_scc implementation used by the image build. Confirm that customizing the base image for HotSpot no longer fails, while the existing OpenJ9 behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100