加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0004-fix-docker-swarm-run-failed-for-loongarch64.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
From d982ada96908ceef19f30d88ffda5e7956c2809e Mon Sep 17 00:00:00 2001
From: Super User <root@localhost.localdomain>
Date: Wed, 10 Jul 2024 17:27:20 +0800
Subject: [PATCH] fix docker swarm run failed for loongarch64
---
.../moby/swarmkit/v2/manager/scheduler/filter.go | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/vendor/github.com/moby/swarmkit/v2/manager/scheduler/filter.go b/vendor/github.com/moby/swarmkit/v2/manager/scheduler/filter.go
index 4e0bb9f..97847e1 100644
--- a/vendor/github.com/moby/swarmkit/v2/manager/scheduler/filter.go
+++ b/vendor/github.com/moby/swarmkit/v2/manager/scheduler/filter.go
@@ -305,6 +305,14 @@ func (f *PlatformFilter) platformEqual(imgPlatform, nodePlatform api.Platform) b
nodePlatform.Architecture = "arm64"
}
+ // normalize "loongarch64" architectures to "loong64"
+ if imgPlatform.Architecture == "loongarch64" {
+ imgPlatform.Architecture = "loong64"
+ }
+ if nodePlatform.Architecture == "loongarch64" {
+ nodePlatform.Architecture = "loong64"
+ }
+
if (imgPlatform.Architecture == "" || imgPlatform.Architecture == nodePlatform.Architecture) && (imgPlatform.OS == "" || imgPlatform.OS == nodePlatform.OS) {
return true
}
--
2.43.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化