Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 1.96 KB

README.md

File metadata and controls

68 lines (53 loc) · 1.96 KB

OpenJDK ROCKs

This repository contains demos of Ubuntu OpenJDK-based ROCK containers.

Try building the rock images for Java applications

The steps below describe installing all the prerequisites to run samples on the Ubuntu system.

Step 1: Install Rockcraft

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

Step 2 (optional): install the Gradle plugin from source

git clone https://github.com/rockcrafters/java-rockcraft-plugins
cd java-rockcraft-plugins
./gradew publishToMavenLocal

Add the local maven repository in the init script:

cat << EOF > ~/.gradle/init.d/rockcraft-plugin.gradle.kts
beforeSettings {
    pluginManagement {
        repositories {
            gradlePluginPortal()
            maven {
                url = uri(System.getProperty("user.home") + "/.m2/repository")
            }

        }
    }
}
EOF

Step 3: install Docker

sudo snap install docker
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
sudo snap disable docker
sudo snap enable docker

or

sudo apt install docker.io