How to deal with persistent storage (e.g. databases) in Docker

前端 未结 14 1079
野的像风
野的像风 2020-11-22 11:54

How do people deal with persistent storage for your Docker containers?

I am currently using this approach: build the image, e.g. for PostgreSQL, and then start the c

14条回答
  •  伪装坚强ぢ
    2020-11-22 12:10

    In Docker release v1.0, binding a mount of a file or directory on the host machine can be done by the given command:

    $ docker run -v /host:/container ...
    

    The above volume could be used as a persistent storage on the host running Docker.

提交回复
热议问题