How to run docker image with entrypoint

I have a docker image which works fine:

docker run -it achalneupane/bbmapv1 which demuxbyname.sh
/usr/local/bbmap/demuxbyname.sh

command I am using to run it:

chmod u+x /01-RAW/ADNI_WGS/bbmap.sh
export PR="ADNI_WGS"
export BASE="/basepath"
export DEST="${BASE}/WXS_Aquilla/01-RAW"
export EMAIL="[email protected]"
export FULLSM="ADNI_1380^LP6005117-DNA_G04^ADNI_WGS"
export sampleFQ="/gscmnt/gc2645/wgs/WXS_Aquilla/01-RAW/ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/DNUT/test.fastq"
export COLNUM=2
export delimiter=":"
export MEM=16
export INDIR="/01-RAW/ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/DNUT"
export OUTDIR="/01-RAW/ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/DNUT"
export sortedFQ="ADNI_1380^LP6005117-DNA_G04^ADNI_WGS_1.fastq.gz"
bsub 
  -J "${FULLSM}_BBMAP" 
  -o "/01-RAW/ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/DNUT/${FULLSM}.s01splitfastq2.%J" 
  -u "${EMAIL}" 
  -n1 -W 1440 
  -R "rusage[mem=120192]" 
  -q research-hpc 
  -a 'docker(achalneupane/bbmapv1)' 
/01-RAW/ADNI_WGS/bbmap.sh

My entrypoint is bbmap.sh as a helper script, but I am not sure why it gives me error saying /usr/local/bbmap/demuxbyname.sh : java: command not found. What could be the problem here?

My entrypoint is bbmap.sh:

#!/bin/bash
CUR_STEP="/usr/local/bbmap/demuxbyname.sh"
"${CUR_STEP}" -Xmx${MEM}g in="${INDIR}/${sortedFQ}" delimiter=${DELIM} prefixmode=f column=${COLNUM} out="${OUTDIR}/${sampleFQ}_%_#.fq"

My Docker file:

FROM openjdk:8-jre
LABEL maintainer="AN <[email protected]>"

LABEL org.label-schema.schema-version="1.0"
# LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="achalneupane/bbmapv1"
LABEL org.label-schema.description="Image for creating interleaved fastq"

RUN apt-get update -y 
&& apt-get install --no-install-recommends -y 
 make 
 gcc 
 g++ 
 libz-dev 
 libbz2-dev 
 liblzma-dev 
 ncurses-dev 
 bc 
 libnss-sss 
 time 

ENV BBMAP_URL http://downloads.sourceforge.net/project/bbmap/BBMap_38.87.tar.gz
RUN cd /usr/local/ 
    && wget -O bbmap.tar.gz ${BBMAP_URL} 
    && tar -xvzf bbmap.tar.gz 
    && rm bbmap.tar.gz
ENV PATH="/usr/local/bbmap:${PATH}"

Source: Docker Questions