I've created an image in docker and having /app/run.sh: line 7: java: command not found
while trying to run this using sudo docker run com.project.question/question:1.0.0
.Here's my run.sh
#!/bin/bash
SPRING_ACTIVE_PROFILE=${SPRING_ACTIVE_PROFILE:-"local-docker"}
GIT_BRANCH_LABEL=${GIT_BRANCH_LABEL:-"develop"}
java -jar -Djava.security.egd=file:/dev/urandom - Dspring.profiles.active=${SPRING_ACTIVE_PROFILE} - Dgit.config.active.branch=${GIT_BRANCH_LABEL} -Duser.timezone=Asia/Kolkata -XX:+PrintFlagsFinal $JAVA_OPTIONS -jar ${APP_JAR_NAME}.jar
Here's my DockerFile
FROM openjdk:8u121-jdk-alpine
FROM ubuntu:18.04
ENV APP_JAR_NAME question
RUN apt-get update
RUN apt-get install -y curl apt-utils wget unzip
RUN rm -rf /var/chache/apk/*
RUN mkdir /app
ADD ${APP_JAR_NAME}.jar /app/
COPY run.sh /app/
RUN chmod +x /app/run.sh
WORKDIR /app
EXPOSE 8080
ENTRYPOINT ["/bin/bash","-c"]
CMD ["/app/run.sh"]
I'm having following images in my docker
I'm looking for the solution for hours but didn't find anything useful. Please help me figure this out. Thanks