docker - 容器(即 docker)和封装包(即 flatpak、snap)之间的概念和实际区别是什么?

标签 docker deployment snapcraft flatpack

我经常读到这两个概念完全不同,但我找不到一个很好的解释来说明差异所在。捆绑依赖并限制与外界的对话。

我应该何时将我的应用打包到容器中以进行部署?什么时候最好封装封装?

最佳答案

Flatpack 提供了其FAQ includes 的线索。 :

Is Flatpak a container technology?

It can be, but it doesn't have to be. Since a desktop application would require quite extensive changes in order to be usable when run inside a container you will likely see Flatpak mostly deployed as a convenient library bundling technology early on, with the sandboxing or containerization being phased in over time for most applications.

In general though we try to avoid using the term container when speaking about Flatpak as it tends to cause comparisons with Docker and Rocket, comparisons which quickly stop making technical sense due to the very different problem spaces these technologies try to address. And thus we prefer using the term sandboxing.

Is Flatpak tied to Linux?

Yes. We are explicitly using many features of the linux kernel (bind mounts, namespaces, seccomp, etc) to create the sandbox that Flatpak apps are running in. It may be possible to use equivalent technologies on other kernels, but that would be a non-trivial amount of work, and we don't consider this one of our priorities.

容器旨在为任何实现其 runc/containerd 协议(protocol)的系统提供隔离,并且很快将在 Windows 和 Linux 上提供。

这与完全依赖于操作系统的软件打包格式不同。
请参阅“Flatpak, Appimage And Snap – How Do They Stack?”。

关于docker - 容器(即 docker)和封装包(即 flatpak、snap)之间的概念和实际区别是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38240886/

相关文章:

docker - 如何在不丢失更改的情况下停止/重新启动 docker 容器?

ubuntu - 写入卷装载时 Kubernetes pod 内存不足

docker - 从另一个容器访问一个容器中的 MySQL

linux - Git、Gitolite、部署和 Linux 权限

tomcat - tomcat报错 "FAIL - Deploy Upload Failed, Exception: null"是什么原因?

python - .bashrc 中设置的 Fabric 环境变量不可用

qt - 如何从 Qt 项目构建 SNAP 包

python - Docker flask 无法连接

Raspberry Pi 3 上的 Ubuntu Core 16 无法连接到 Docker 守护进程