docker exec myapp sh -c 'echo hello > /tmp/test.txt'

Category: Docker

docker exec myapp sh -c 'echo hello > /tmp/test.txt'

Run a shell command string inside a container

Runs a shell command string inside the container.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.