docker compose run --entrypoint /bin/sh web

Category: Docker

docker compose run --entrypoint /bin/sh web

Run a one-off command with a custom entrypoint

Overrides the service's entrypoint for a single run, here opening a shell in a fresh container. The container is temporary and removed with --rm. The original entrypoint is unaffected for normal docker compose up runs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.