对整个服务器使用 docker 图像

Use a docker image for a whole server

我为我的一些项目购买了 VPS 服务器。
我想知道在该服务器上 运行 单个 docker 图像并在 docker 上进行所有服务器配置、项目配置、虚拟主机等是否有意义图片。

我的目标是避免在更换服务器时重做所有配置工作。

Docker适合这个吗?
我是否应该为每个项目构建一个 docker 图像(但我想我将不得不拥有多个 Apache 实例)?
如果我更换服务器真的会节省时间吗?

I'm wondering if it would make sense to run a single docker image on this server and do all the server configuration, projects config, virtual hosts, etc... on the docker image.

不,您应该在 VPS 上 运行 多个 Docker 容器,每个容器一个服务。

My goal is to avoid having to redo all the configuration work if I change of server.

Is Docker suited for this ?

是的,绝对适合这种情况。 Docker文件将存储容器的配置。您还可以使用 Docker Registry 来帮助您将容器运送到任何地方。

Should I instead build one docker image per project (but then I will have to have multiple Apache instances I guess)?

是的,你应该

Will it really save time if I change of server ?

当然可以。但是你需要学会如何正确地应用Docker。