how can I create a data-container only using docker-compose.yml?

前端 未结 3 1950
攒了一身酷
攒了一身酷 2020-12-29 21:53

This question is coming from an issue on the Docker\'s repository:
https://github.com/docker/compose/issues/942

I can\'t figure it out how to create a data conta

3条回答
  •  长发绾君心
    2020-12-29 22:29

    As mention in the issue from the OP's question:

    • you either create a data container with the same name as the one specified in the docker-compose.yml, and run docker-compose up --no-recreate (the one specified in docker-compose.yml won't be recreated).
    • or you run a container with a simple command which never returns.
      Like: tail -f /dev/null

提交回复
热议问题