Disclaimer: I am a consultant at Amazon Web Services, and this is my personal blog. The opinions expressed here are solely mine and do not reflect the views of Amazon Web Services (AWS). Any statements made should not be considered official endorsements or statements by AWS.
Use the below syntax:
docker exec -ti <container_id> <command>
To check the container id, run
docker container ls command in the console.
docker exec -ti date
docker exec -ti 011f0b0f68ce echo "hello world"
docker exec -ti 011f0b0f68ce mkdir -p "/home/databox"