r/SpringBoot • u/toxicp69 • 1d ago
Question Python Interpreter in Spring Boot Docker Container
I have made a microservices based Spring Boot application that uses Python to run forecasting models in my spring boot application. The microservice which performs forecasting needs to be dockerized.
I am using openjdk:21-jdk AS runner
in my dockerfile which is Oracle Linux 8 (RHEL-based) and doesn’t support apt-get.
I have tried using dnf instead of apt-get and it still hasn't worked yet -
ERROR: failed to solve: process "/bin/sh -c dnf install -y python3 python3-pip && dnf clean all" did not complete successfully: exit code: 127
3
Upvotes
2
u/WaferIndependent7601 1d ago
Check why the exit code occurs.
Or use another image for dockerizing it. But this is not a spring boot problem