Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save facelordgists/2891d75da4e3a16c5f6a605aa33f1c3e to your computer and use it in GitHub Desktop.
Save facelordgists/2891d75da4e3a16c5f6a605aa33f1c3e to your computer and use it in GitHub Desktop.
Terminal: SSH into docker-compose service container.md

See: https://docs.docker.com/compose/reference/exec/

While in the same folder as a running docker container execute the following command:

docker-compose exec wp bash

For a much crappier shell, type this: docker-compose exec wp sh

in this example wp is the service defined in the docker-compose.yml

docker-compose exec <service> bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment