FROM python:3.10
COPY . .

#ENTRYPOINT ["/bin/bash", ""]
#ENTRYPOINT  ["sh", "-c", "/app/ \"$@\"", "--"]
CMD ["sh", "-c", "/app/ \"$@\"", "--"]
echo $@

Both the line starting with ENTRYPOINT is correct. The line starting with CMD is wrong. The answer is in

docker run your_image arg1 arg2 will replace the value of CMD with arg1 arg2. That’s a full replacement of the CMD, not appending more values to it. This is why you often see docker run some_image /bin/bash to run a bash shell in the container.