'How get into a running docker container and run a python script

I am trying to run a python script in a running docker container in detached mode like so:

docker exec -d pylot python3 pylot.py

I have tried this, but this fails silently. How can I run this python script with docker exec?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source