Why does a container running a console app simply exits after starting

后端 未结 2 1746
伪装坚强ぢ
伪装坚强ぢ 2021-01-23 15:38

I want to run a simple dotnet core console app in a container interactively. I am not able to do that and the container simply starts and then exits immediately without fully ru

2条回答
  •  北海茫月
    2021-01-23 16:12

    By default, you don't have an interactive TTY when the container is started with docker-compose up.

    You need to add that to your service:

    stdin_open: true
    tty: true
    

提交回复
热议问题