to use this script,
copy it to /usr/local/bin/
then in a folder where you are working on an app hosted in docker, add the name of your docker container to a .dockername
file
echo my-container-name >> .dockername
now you can
dexec ps
to run ps
(or any other command) inside of your docker container