docker compose exec web sh -c 'cat /etc/hosts'

Category: Docker

docker compose exec web sh -c 'cat /etc/hosts'

Run a shell command inside a compose service container

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