0

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.

1
  • 1
    can you show directory structure? and the Dockerfile? Commented Jul 16, 2020 at 5:33

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

1 Comment

You should usually prefer COPY to ADD, unless you specifically want ADD's more unusual features (fetching remote URLs, unpacking tar files).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.