Using docker-compose, I found the easiest way to do this is to do a docker ps -a
(after starting my containers with docker-compose up
) and get the ID of the container I want to have an interactive shell in (let's call it xyz123).
Then it's a simple matter to execute
docker exec -ti xyz123 /bin/bash
and voila, an interactive shell.