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

前端 未结 14 1282
野的像风
野的像风 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:24

    It depends on your scenario (this isn't really suitable for a production environment), but here is one way:

    Creating a MySQL Docker Container

    This gist of it is to use a directory on your host for data persistence.

提交回复
热议问题