Docker Onpremise与Azure之间在数据保存方面的区别? [英] Differences between Docker Onpremise and in Azure, concerning data preservation?

查看:132
本文介绍了Docker Onpremise与Azure之间在数据保存方面的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I'm developing locallly/Windows Server 2019 VM with Docker Containers.

启动/停止这些容器时,容器内的数据仍会保留.我在容器内使用SQL-Express.

When I start/stop these containers, the data inside my containers is still preserved. I'm using SQL-Express inside the containers.

我正在尝试切换到Azure上的Docker容器,但令我遗憾的是,我似乎找不到一个简单"的解决方案.具有相同经验的解决方案.

I'm trying to make a switch to Docker Containers on Azure, but to my regret I can't seem to find an "easy" solution to have the same experience.

在Azure(ACS)中停止/启动Windows容器时,我看到该容器已重新创建,因此所有数据都消失了.

When stopping/starting a Windows Container in Azure (ACS), I see that the container is re-created, so all data is gone.

认为Kubernetes可能会给我带来更多的可能性,但据说Windows容器尚不支持.相反,他们使用虚拟配置,仍然使用ACS.

Thought that Kubernetes might give me more possibilities, but it is stated that Windows Containers are not supported "yet". Instead they use a virtual configuration, still using ACS.

我在这里有哪些选择.是否可以像在本地部署容器一样,仍然可以将数据保存在容器中.我已经考虑过在Azure中创建VM,但是如果我已经在本地创建了VM,那么有什么用.

What are my options here. Is it possible to deploy a container like I do locally, where it's still possible to preserve my data inside a container. I've considered to create a VM in Azure, but what's the use if I already have this locally.

推荐答案

您好,Michel,

Hi Michel,

我希望您使用的是 ACI .如果您使用的是ACS,请告诉我您使用的是哪种服务(kubernetes或DC OS或群集).

I hope you are using ACI. If you are using ACS, let me know which service you are using(kubernetes or DC  OS or swarm).

通常,容器不保留数据.在本地计算机上,您将创建一个本地卷并附加到该容器.这样就可以持久保存数据.

Generally container dont persist data. In your local machine You would have created a local volume and attached to the container. That way it persisted the data.

但是在Azure ACI中,您不能将持久性存储附加到Windows容器.有计划可以增加支持.

But in Azure ACI , You can't attach a persistent storage to windows container. Plans are there to add support.

一旦还添加了对Azure文件的支持,由于远程存储,数据库性能将很差.但是对于流量较少的应用,应该没问题.

Once the support for Azure files is added also, Database performance will be poor because of the remote storage. But for apps with less traffic that should be fine.

现在更简单的方法是部署 来自Azure的SQl服务.由于您使用的是SQL Express,因此您也可以将其安装在VM上并尝试,但是管理开销很大.

Easier way now is to deploy SQl service from azure. Since you are using SQL express, You can also install it on a VM and try, But management overhead is there.

请查看此链接,让我知道它是否适合您的需求.

Please checkout this link and let me know if it fits for your needs.


这篇关于Docker Onpremise与Azure之间在数据保存方面的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆