zoukankan      html  css  js  c++  java
  • Use volumes

    Use volumes

    Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. While bind mounts are dependent on the directory structure of the host machine, volumes are completely managed by Docker. Volumes have several advantages over bind mounts:

    • Volumes are easier to back up or migrate than bind mounts.
    • You can manage volumes using Docker CLI commands or the Docker API.
    • Volumes work on both Linux and Windows containers.
    • Volumes can be more safely shared among multiple containers.
    • Volume drivers let you store volumes on remote hosts or cloud providers, to encrypt the contents of volumes, or to add other functionality.
    • New volumes can have their content pre-populated by a container.

    In addition, volumes are often a better choice than persisting data in a container’s writable layer, because a volume does not increase the size of the containers using it, and the volume’s contents exist outside the lifecycle of a given container.

    If your container generates non-persistent state data, consider using a tmpfs mount to avoid storing the data anywhere permanently, and to increase the container’s performance by avoiding writing into the container’s writable layer.

    Volumes use rprivate bind propagation, and bind propagation is not configurable for volumes.

  • 相关阅读:
    序例化-Externalizable 接口
    线程休眠
    线程优先级
    const & 用法
    AcGePoint3d ads_point 转换
    结果缓冲区 resbuf具体用法
    选择集用法
    引用用法
    通过用户选择获取各种东西
    ARX中类型强制转换
  • 原文地址:https://www.cnblogs.com/chucklu/p/13162998.html
Copyright © 2011-2022 走看看