Deployment of Java app "Spectre Desktop" fails

Hi,
I want to deploy password manager app “Spectre Desktop” f.k.a. “Masterpassword-gui” on MicroOS.
Actually I have a jar-file that works on regular desktops using this command:
java -jar /path/to/jar-file/masterpassword-gui.jar

There’s neither a flatpak nor a docker container available, but I’m confident that a container solution is the right approach.

Therefore I started to build an image using podman and this dockerfile:

# Filename: mpw-gui
FROM alpine:latest
RUN apk add java-common p11-kit-trust java-cacerts openjdk17-jre-headless alsa-lib giflib lcms2 openjdk17-jre openjdk17-jmods openjdk17-jdk
COPY files/masterpassword-gui.jar /home/thomas/Software/masterpassword-gui.jar
CMD ["java", "-jar", "/home/thomas/Software/masterpassword-gui.jar"]

tree Software/container/mpg-gui/
Software/container/mpg-gui/
├── Dockerfile
└── files
    └── masterpassword-gui.jar

1 directories, 2 files

However running this container fails.

Masterpassword-gui is obviously desktop application, and I assume I didn’t consider this accordingly in my dockerfile.

Could you please advise how to build this container correctly with podman?

THX

@cmonty28 Maybe distrobox might be a better option on MicroOS?

@cmonty28 I see they have a Dockerfile… https://gitlab.com/spectre.app/desktop/-/blob/main/Dockerfile?ref_type=heads

Building the app and creating the container fails with same error:

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread "Daemon worker"]

I have a generic question though:
Will an application run in a container that requires a graphic system?

@cmonty28 just install java and do what you were doing…

@cmonty28 I did build the cli version as a rpm…

Could you please share your RPM?

@cmonty28 It’s here https://build.opensuse.org/package/show/home:malcolmlewis:TESTING/spectre-cli
You need a Build Service account to download as I don’t publish my rpms anymore…

You should be able to install in distrobox…