docker commit running container

后端 未结 2 797
南笙
南笙 2020-12-30 06:03

When committing a running container with docker commit, is this creating a consistent snapshot of the filesystem?

I\'m considering this approach for bac

相关标签:
2条回答
  • 2020-12-30 06:55

    I am in a similar situation. I am thinking about not using a dedicated data volume container instead committing regularly to have some kind of incremental backup. Beside the incremental backup the big benefit is for a team developing approach. As newcomer you can simply docker pull a database image already containing all the data you need to run, debug and develop.

    So what I do right now is to pause before commit:

    docker pause happy_feynman; docker commit happy_feynman odev:`date +%s`
    

    As far as I can tell I have no problems right now. But this is a developing machine so no I have no experience on heavy load servers.

    0 讨论(0)
  • 2020-12-30 06:56

    I guess consistency is what you define it to be.

    In terms of flattening and the downsides of stacking too many AUFS layers see: https://github.com/dotcloud/docker/issues/332

    docker flatten is linked there.

    0 讨论(0)
提交回复
热议问题