shashashamti2008
shashashamti2008

Reputation: 2337

Docker RUN Not Finding an Executable File

I am having issues setting up a Dockerfile in Ubuntu. I tried the following command:

sudo docker build -t chaste .

But when it reaches to the following command:

RUN chmod +x chaste.sh && ./chaste.sh -q && rm -f chaste.sh

I get the following error:

chmod: cannot access 'chaste.sh': No such file or directory

However, chaste.sh is in the current directory. I am not sure why it complains about not being able to find it.

I would appreciate it if someone could help me out.

Upvotes: 0

Views: 131

Answers (1)

akazuko
akazuko

Reputation: 1394

To use the file from current directory you should add it from build context to the container by adding the following command above RUN command in your Dockerfile:

ADD ./chaste.sh ./chaste.sh

Upvotes: 1

Related Questions