Docker for Jobs(Docker for Jobs)
我试图了解这是否是Docker的有效用例。
假设我正在创建一个python应用程序,并且用户提交了一个特定类型的作业。 我想以编程方式使用
docker run
启动一个用于处理作业的docker镜像。 docker镜像需要能够接收作业,然后退出向我发送作业成功的消息。这有意义吗? 怎么可以使用python完成? 如何观察泊坞容器及其状态?
或者让docker镜像简单地在循环上运行,从共享卷中查找作业更有意义吗?
I am trying to understand if this is a valid use case for Docker.
Suppose I am creating a python application, and the user submits a job of a specific type. I would like to then use
docker run
programmatically to start a docker image that is designed to process the job. The docker image would need to be able to receive the job, and then exit sending me a message that the job is successful.Does this make sense? How could this be done using python? How can I observe docker containers and their status?
Or would it make more sense for the docker image to simply run on a loop, looking for jobs from a shared volume?
原文:https://stackoverflow.com/questions/35878808
最满意答案
尝试连接PayPal服务器时,问题是C#默认为SSL3,PayPal不接受。 PayPal至少需要(更安全)TLS 1.2。
您可以通过以下代码进行设置:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The problem is C# defaults to SSL3 when trying to connect to the PayPal server, which PayPal doesn't accept. PayPal requires the (more secure) TLS 1.2 as a minimum.
You set this through the following code:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
相关问答
更多-
您正在使用ServerCertificateValidationCallback正确执行此操作。 这不是你面临的问题。 您面临的问题很可能是SSL / TLS协议的版本。 例如,如果您的服务器仅提供SSLv3和TLSv10,并且您的客户端需要TLSv12,那么您将收到此错误消息。 你需要做的是确保客户端和服务器都支持通用协议版本。 当我需要一个能够连接尽可能多的服务器(而不是尽可能安全)的客户端时,我使用它(以及设置验证回调): ServicePointManager.SecurityProtocol ...
-
我似乎记得去年有这个问题。 我怀疑你没有正确关闭你的WebRequest对象,这就是为什么经过一定程度的使用它不会允许你创建任何新的连接。 I seem to recall having this problem last year. I suspect that you aren't closing your WebRequest objects properly, which is why after a certain amount of use it won't allow you to creat ...
-
请求已中止:无法创建SSL / TLS安全通道(The request was aborted: Could not create SSL/TLS secure channel)[2023-06-04]
我不得不启用其他安全协议版本来解决问题: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; I enabled logging using this code: http://blogs.msdn.co ... -
请求已中止:无法创建SSL / TLS安全通道(The request was aborted: Could not create SSL/TLS secure channel)[2022-12-31]
我终于找到了答案(我没有注意到我的来源,但是来自搜索); 当代码在Windows XP中工作时,在Windows 7中,您必须在开头添加: ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // Use SecurityProtocolType.Ssl3 if needed for compatibility reasons 现在, ... -
尝试连接PayPal服务器时,问题是C#默认为SSL3,PayPal不接受。 PayPal至少需要(更安全)TLS 1.2。 您可以通过以下代码进行设置: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; The problem is C# defaults to SSL3 when trying to connect to the PayPal server, which PayPal doesn't ac ...
-
你的代码片段没有指定要使用的安全协议, 例: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 我在对付paypal api的不同身份验证方法后发现了这一点。 这里有一个相关的话题值得信任。 问题与-贝宝API-HTTP调用 注意:这个答案是在原始OP问题的注释串之后添加的。 Your code snippet does not specify the security protocol to use from what ...
-
我们有完全相同的问题。 今天早上出现Cloudflare支持TLS 1.0 / 1.1(在我们的例子中)。 我把它提到了Cloudflare。 但他们还没有回应。 与此同时,我在社区中提问( https://community.cloudflare.com/t/was-the-tls-1-0-1-1-not-supported-since-4am-utc-2017-10-30/ 7586/3 )。 还有其他用户受到影响。 我最初的想法是DST,但今天是DST切换后的第二天,加上我们的服务器/客户端使用UTC ...
-
没有特别的理由说明为什么代码在Windows 2012上失败,TLS可用并默认打开(我在一些新的2012R2盒子上测试了你的代码示例,因为我这样偏执:))。 这意味着特定服务器的配置会阻止连接使用TLS 1.2。 检查以下事项: 在注册表中,检查HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols 。 是否在SSL 2.0之外禁用(甚至提及)任何协议? 在服务器上的事件日志中,连接失败后是否有任何Schannel ...
-
XmlReader.Create错误“无法创建SSL / TLS安全通道”(XmlReader.Create error “Could not create SSL/TLS secure channel”)[2022-07-26]
服务器控制最终协商的协议。 Stackoverflow服务器仅需要TLS v1,如下面的wireshark capture所示。 此跟踪是在.Net框架版本4上完成的。 Github Feed拒绝TLS v1.2以下的任何内容,因此在.Net 4.0上失败,因为该版本默认不可用。 如果在同一台计算机上安装了.Net 4.5+ , 则可以通过在ServicePointManager上设置SecurityProtocol来解决此问题。 如果你不这样做,那么你根本无法提出要求。 您通过使用SecurityProt ... -
我在“ 属性”窗口的“ 登录”选项卡中找到了Windows服务的权限设置,将帐户从“ 本地系统”更改为“ 我的用户帐户” (登录用户),它就像一个魅力。 I found Windows Service's permission settings in Properties window's Log On tab, changed account from Local System to My User Account (Logged In User) and it works like a charm.