Improve Dockerfiles for a more seamless experience customizing for hotspot
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.