linux - 为什么在主机挂载上使用纯数据容器?

标签 linux docker

我了解纯数据容器的概念

但是,鉴于纯数据容器似乎更难找到数据,为什么要在简单的主机挂载上使用纯数据容器。

最佳答案

当您不想自己管理挂载并且不需要经常查找数据时。数据库容器就是一个很好的例子,使用纯数据容器可以为您提供以下便利:

甚至不需要知道您必须为成熟的容器创建多少卷,例如

docker run --name my-data tutum/mysql:5.5 true
docker run -d --name my --volumes-from my-data tutum/mysql:5.5

通过 docker 简化管理。当您需要重新开始时,您不必手动删除主机目录或创建新路径。

关于linux - 为什么在主机挂载上使用纯数据容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29223324/

相关文章:

Linux:有没有办法为所有打印到显示器的输出加上时间戳?

c++ - Linux 上的 Netbeans C/C++ "step in to"Linux C 运行时代码?

linux - 须藤-i : why does this give a root shell?

linux - 如何在 CentOS 6.5 中安装 docker 1.9+?

docker - Windows 和 Linux 之间绑定(bind)挂载的 setfacl 行为不一致

c - Linux 3.0 : "glibc detected" abort - tuning corruption detected feature?

Debian Docker 容器中的 PowerShell Core 错误

unix - 如何将命令行选项传递给我的 dockerized GoLang 程序?

ssh - 运行我的应用程序容器时自动启动和公开 ssh 的正确方法

linux - AH00526 : Syntax error on line 74 of/etc/apache2/apache2. conf:参数文件中的无效互斥目录:${APACHE_LOCK_DIR}