Skip to content

Run in interactive mode in docker-compose

Adding to the target service in the docker-compose.yaml file to interactive within image

docker-compose.yaml
services:
  backend:
    # ...
    # Run in interactive mode
    # ref: https://stackoverflow.com/questions/36249744/interactive-shell-using-docker-compose
    stdin_open: true # docker run -i
    tty: true # docker run -t
    # ...