FROM ubuntu:latest
WORKDIR /app
COPY gencsv.sh /app/gencsv.sh
RUN chmod +x /app/gencsv.sh
CMD ["/bin/bash", "/app/gencsv.sh"]`
docker run -dp 9393:9393 -v "$(pwd)/inputFile:/app/inputFile" input 2 8
docker: Error response from daemon: OCI runtime create failed
exec: "2": executable file not found in $PATH: unknown.
This error means you're trying to execute "2" as a command, but (of course) it's not valid and not in $PATH.
Use Entrypoint as @Tuning85 said.
CMD - you can override the default command. Which docker thinks you are trying to do with 2 8
Entrypoint - can't be overridden and the the command line parameters are passed as arguments to "app/gencsv.sh" script