1

I am trying to integrate jdk with a python venv on a distroless docker container for my application

I am not able to import java modules in the venv created in the distroless container

How do i export jdk modules into the distroless container so that the application works

Traceback (most recent call last):
  File "sutime_server.py", line 18, in <module>
    sutime = SUTime(jars='jars', mark_time_ranges=True, include_range=True)
  File "/app/sutime/sutime.py", line 47, in __init__
    self._start_jvm()
  File "/app/sutime/sutime.py", line 67, in _start_jvm
    jpype.getDefaultJVMPath(),
  File "/venv/lib/python3.7/site-packages/jpype/_core.py", line 337, in getDefaultJVMPath
    return finder.get_jvm_path()
  File "/venv/lib/python3.7/site-packages/jpype/_jvmfinder.py", line 160, in get_jvm_path
    jvm = method()
  File "/venv/lib/python3.7/site-packages/jpype/_jvmfinder.py", line 215, in _get_from_known_locations
    for home in self.find_possible_homes(self._locations):
  File "/venv/lib/python3.7/site-packages/jpype/_jvmfinder.py", line 120, in find_possible_homes
    for childname in sorted(os.listdir(parent)):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/jvm'

this is the error which i am getting while running the application

0 Answers0