docker compose - logging into a running container

You have done

  • docker-compose build
  • docker-compose run -d

And it works !!

Well it runs but something is not good.

We need to log in

so

  • docker ps

Get the ID

then

  docker exec -ti <ID> /bin/bash

If this does not work add the following 2 lines to the docker-compose.yml file

  container:
    # 
    # Allows -i login
    stdin_open: true
    tty: true