ERROR: The JAVA_HOME environment variable is not defined correctly

I encountered an error when running the liquibase docker image,
(1)image version:4.21,
(2)error: The JAVA_HOME environment variable is not defined correctly, so Liquibase cannot be started. JAVA_HOME is set to “/opt/java/openjdk” and it does not exist.
(3)operating system :Linux version 3.10.0-862.el7.x86_64
(4)docker version: Docker version 18.06.3-ce, build d7080c1
how can this be resolved?

Change the base image from ‘eclipse-temurin:17-jre-jammy’ to ’ eclipse-temurin:17-jre-focal’ and rebuild the image works for me.

Wp.