Docker运行未找到etrypoint

I have the following Dockerfile:

FROM ubuntu:19.10
WORKDIR /gen
COPY script.sh ./

RUN chmod +x script.sh && export PATH="/gen/:$PATH"

ENTRYPOINT [ "script.sh" ]

It builds fine, but I cannot execute it. The solution from post is to add the full path to the script (ENTRYPOINT [ "/gen/script.sh" ]), which does not work.

Adding the folder to PATH also does not work. Why is that?

Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"script.sh\": executable file not found in $PATH": unknown.

EDIT: The problem comes from me calling the container with docker rum --rm -v some/dir:/gen containerName.