docker run immediately returns and does not show output of

  bash, containers, docker

I have a simple file with this: echo "hello" (with or without #!/bin/bash it gives the same error)

this command immediately returns even though there is a in this place in the container:

docker run --rm -v $SCRIPTPATH/../:/home/project my_container --entrypoint bash /home/project/

and there’s no output, it should say hello.

I did

docker run --rm -v $SCRIPTPATH/../:/home/project -it my_container /bin/bash


and it works.

This is how my Dockerfile ends:

WORKDIR /home/project
ENTRYPOINT "/bin/bash"

What am I doing wrong?

I found many places talking about running a script by doing how I did

Source: Docker Questions