Should I use docker-compose up or run?

后端 未结 3 824
轻奢々
轻奢々 2020-12-22 20:46

Is there a reason to use run to start up a docker-compose.yml file or should you just use up?

I understand that run

3条回答
  •  青春惊慌失措
    2020-12-22 21:22

    I'd like to point out that if you're using Python with the pdb debugger:

    import pdb; pdb.set_trace()
    

    It will not drop to the shell if you execute your script using:

    docker-compose up
    

    However if you use run, it will drop down to the debugger as expected:

    docker-compose run
    

提交回复
热议问题