I am having problem passing ENV variable which I have defined in Dockerfile. Here is the section of Dockerfile
The Dockefile is as shown below
################################################################
Sets the Base image
FROM openjdk:8-jre
LABEL maintainer=“user_email”
The first file should be be the main application called by the startup script
The second file should be the startup script
Include all other necessary files here and add them to the image and change their permissions below
ENV RELEASE_VERSION ${release_version}
ENV JAR_NAME ${jar_name}
ENV FILE1 ${JAR_NAME}
ENV FILE2 startup.sh
ENV FILE3 downselection.py
ENV FILE4 sql_py.py
ENV WORK_DIR /opt/serimmune/
Installs cloud-sql
RUN apt-get update \
&& apt-get install -y wget \
&& mkdir -p ${WORK_DIR}proxy \
&& wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O ${WORK_DIR}proxy/cloud_sql_proxy \
&& chmod +x ${WORK_DIR}proxy/cloud_sql_proxy;
Installs python and necessary python packages
RUN apt-get update \
&& apt-get install -y python3-pip \
&& apt-get install -y python-mysqldb \
&& pip3 install mysql-connector-python \
&& pip3 install numpy \
&& pip3 install scipy \
&& pip3 install pandas==0.23.4 \
&& pip3 install scikit-learn \
&& pip3 install xlrd \
&& pip3 install openpyxl;
Exposes port 3306 for MySQL
EXPOSE 3306
Copies necessary files into image
COPY build/libs/{FILE1} {WORK_DIR}
COPY {FILE2} {WORK_DIR}
COPY {FILE3} {WORK_DIR}
COPY {FILE4} {WORK_DIR}
Changes the permissions of those files
RUN chmod +x {WORK_DIR}{FILE1}
RUN chmod +x {WORK_DIR}{FILE2}
RUN chmod +x {WORK_DIR}{FILE3}
RUN chmod +x {WORK_DIR}{FILE4}
Sets the startup script as what the container will first run
#ENTRYPOINT ["/bin/bash", “-c”, “/opt/serimmune/startup.sh $RELEASE_VERSION”]
ENTRYPOINT exec /opt/serimmune/startup.sh $RELEASE_VERSION
CMD ["", “”]
##################################################################
Any suggestion The startup,sh needs to get $RELEASE_VERSION as input parameter so it can make jar file name with version number.
What am I doing wrong??
Thanks,
Vikram