'Libreoffice for openjdk docker container

I have openjdk:8-alpine image, I have installed libreoffce with sh and apk add LibreOffice command and I try to run soffice --headless command, but I get:

javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx

I've checked java version:

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

What's wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source