Custom UDI9 image
Creating a customized Universal Developer Image
There may be a need to build your own Universal Developer Image if the base image doesn’t have what you need. My use-case was updating the version of Maven to something newer in order to run Quarkus native commands. The devspaces Containerfile/Dockerfile can be easily rebuilt locally and pushed to a registry, and referenced as normal in a devfile.
Here’s the repo to clone. https://github.com/devfile/developer-images.git
I basically just updated the install commands to pick a specific version of Maven.
... omitted for brevity ...
# Java
RUN curl -fsSL "https://get.sdkman.io/?rcupdate=false" | bash \
&& bash -c ". /home/tooling/.sdkman/bin/sdkman-init.sh \
&& sed -i "s/sdkman_auto_answer=false/sdkman_auto_answer=true/g" /home/tooling/.sdkman/etc/config \
&& sed -i "s/sdkman_auto_env=false/sdkman_auto_env=true/g" /home/tooling/.sdkman/etc/config \
&& sdk install java 8.0.432-tem \
&& sdk install java 11.0.25-tem \
&& sdk install java 17.0.13-tem \
&& sdk install java 21.0.5-tem \
&& sdk install java 23.1.5.r21-mandrel \
&& sdk default java 17.0.13-tem \
&& sdk install gradle \
&& sdk install maven 3.9.10 \
&& sdk install jbang \
&& sdk flush archives \
&& sdk flush temp" \
&& chgrp -R 0 /home/tooling && chmod -R g=u /home/tooling
... omitted for brevity ...
Navigate to developer-images/universal/ubi9 and modify the Dockerfile there, and run your build command.
podman build -f Dockerfile -t <myrepo>/udi9:<tag> .