(20200916 Solved) docker-compose up automatically exits when creating a container

  • Problem Description

    Like the title, it automatically exits after creating the container.

    And docker start container is invalid

  • solution

    The reason is that the configuration of the control terminal is missing and needs to docker-compose.ymlbe added to it tty:true. Sometimes this does not work. You need to add another command:/bin/bash. The command is not necessarily this. It needs to be a command that will not exit, and then use -d to start the container in the background.

  • References

  1. docker-compose automatically exits after starting the container

Guess you like

Origin blog.csdn.net/The_Time_Runner/article/details/109230475