Dockerfile can not find entrypoint script

Viewed 2698

I want to use a bash script as the entrypoint in the dockerfile. The code as blow:

ENV INST  INIT
ADD start.sh /start.sh
RUN chmod 777 /start.sh
ENTRYPOINT /start.sh $INST

It should be right. But when I build the image and run it, the result as below:

/bin/sh: 1: /start.sh: not found

Could anyone help me? Thanks. Total Dockerfile:

FROM debian:latest

ENV INST  INIT
RUN apt-get update
RUN apt-get install -y git build-essential gcc g++ vim 


RUN mkdir /Lab-C-Framework
WORKDIR /Lab-C-Framework
ADD Lab-C-Framework /Lab-C-Framework
RUN make install
RUN chmod 777 -R /Lab-C-Framework

RUN mkdir /project
ADD bin /project
ADD src /project
ADD header /project
ADD tests /project
ADD Docs /project
ADD Makefile /project
RUN chmod 777 -R /project

ADD start.sh /start.sh
RUN chmod 777 /start.sh

RUN mkdir /code
RUN chmod 777 /code
VOLUME /code 
WORKDIR /code


ENTRYPOINT /start.sh $INST
2 Answers
Related