How to make volumes permanent with Docker Compose v2

前端 未结 5 2084
庸人自扰
庸人自扰 2021-02-02 13:19

I realize other people have had similar questions but this uses v2 compose file format and I didn\'t find anything for that.

I want to make a very simple test a

5条回答
  •  隐瞒了意图╮
    2021-02-02 13:59

    The simplest solution is to use docker-compose stop instead of docker-compose down. And then docker-compose start to restart.

    According to the docs, down "stops containers and removes containers, networks, volumes, and images created by up."

提交回复
热议问题