Docker-compose and pdb

前端 未结 3 587
迷失自我
迷失自我 2020-12-12 15:57

I see that I\'m not the first one to ask the question but there was no clear answer to this:

How to use pdb with docker-composer in Python development?

W

3条回答
  •  一整个雨季
    2020-12-12 16:18

    Till my experience, docker-compose up command does not provide an interactive shell, but it starts the printing STDOUT to default read-only shell.

    Or if you have specified and mapped logs directory, docker-compose up command will print nothing on the attached shell but it sends output to your mapped logs. So you have to attach the container separately once it is running.

    when you do docker-compose up, make it in detached mode via -d and connect to the container via

    docker exec -it your_container_name bash

提交回复
热议问题