I have problem, my dockerfile, cant install openjdk-11-jdk, before my script is doing well, but when I want to run again, its problem, my script on dockerfile:
FROM python:3.7
RUN pip install --upgrade pip
RUN apt-get update && \
apt-get install -y \
openjdk-11-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH=$PATH:$JAVA_HOME/bin
Thank you
Dockerfile can doing well to run my apps
Now you have to change the FROM
instruction since the default image for python:3.7
is bookworm
and openjdk-11-jdk
is available on bullseye
:
FROM python:3.7-bullseye
RUN pip install --upgrade pip
RUN apt-get update && \
apt-get install -y \
openjdk-11-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH=$PATH:$JAVA_HOME/bin
Or for a lightweight image, use python:3.7-slim-bullseye
.