This directory contains demos of Java rockcraft plugins and extensions. The demos build Spring Petclinic rock containers.
- basic builds without use of plugins. Use chisel slices to install Java runtime.
- jlink uses the Java jlink tool to create Java runtime.
- jlink-plugin install Java runtime using jlink-plugin.
- maven-plugin uses maven-plugin and jlink-plugin to build the application and install the runtime.
- spring-framework-extension demonstrate Spring Framework rockcraft extension
Those samples require rockcraft features not yet merged into main. Please install rockcraft from this branch:
snap install snapcraft
git clone -b experimental-java https://github.com/vpa1977/rockcraft
cd rockcraft
# ensure that the installed version of rockcraft is removed
snap remove rockcraft
snapcraft
snap install --dangerous --classic *.snap
cd <sample-directory>
rockcraft pack
This will produce a .rock
file to be copied to the docker daemon.
rockcraft.skopeo copy oci-archive:<file>.rock docker-daemon:<image-name>:<image-tag>
docker run <image-name>:<image-tag> -v