Faasd-无法从私有注册表中提取图像

问题描述

我有一个使用OpenFaaS的应用程序。

尤其是,我正在使用 faasd ,因为该功能将在处理能力较差的设备上运行。 我有一个私人注册表,上面有一个“ X”功能的图像。 我想从faasd中提取该映像以进行部署和执行,但是我遇到了一个问题:当我尝试执行该操作时,似乎没有经过身份验证,但是我正确地传递了RegistryAuth令牌。

这里有一个我在做什么的示例(遵循https://ericstoekl.github.io/faas/operations/managing-images/#deploy-functions-with-private-registries-credentials

POST

<ip_address>:8080/system/functions

标题

{
"Authorization": "mytoken"
}

身体:

{
    "service": "functionName","image": "<registry_ip_address>/functions/functionName:<version>","envProcess": "/.../myprocess","registryAuth": <base64 token obtained from 'user:password'>,"secrets": [
        "mysecret"
    ]
}

我确认参数都正确,并且收到此错误

“无法提取图像 / functions / functionName ::无法提取:无法解析引用“ / functions / functionName:”:未为令牌认证挑战指定范围”

注册表运行良好,因为如果我尝试使用docker以经典方式下载映像,则可以拉取映像。

提前谢谢!

解决方法

要想取得成功,您必须创建一个凭证文件。

您通常的〜/ .docker / config.json需要复制到SELECT d.PatientID,d.PatientName -- ...[other demographic fields like DOB,gender,race],a.LastVisitDate,a.NextApptDate,IsActive = CASE WHEN a.LastVisitDate > DATEADD(YEAR,-3,GETDATE()) THEN 'YES' ELSE '' END,InactiveFlag = CASE WHEN d.PatientFlag = 'Inactive Patient!' THEN 'YES' ELSE '' END FROM Demographic d OUTER APPLY ( SELECT TOP(1) a.LastVisitDate,a.NextApptDate FROM Appointment a WHERE d.PatientID = a.PatientID ORDER BY a.LastVisitDate DESC ) a

https://github.com/openfaas/faasd#a-note-on-private-repos--registries