Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad-img
提交
0411cbb5
I
iSulad-img
项目概览
openeuler
/
iSulad-img
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad-img
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0411cbb5
编写于
4月 22, 2020
作者:
W
WangFengTu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support pull image of schema1
Signed-off-by:
N
WangFengTu
<
wangfengtu@huawei.com
>
上级
12ad23f0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
3 deletion
+39
-3
cmd/isulad_img/utils.go
cmd/isulad_img/utils.go
+8
-2
iSulad-img.spec
iSulad-img.spec
+1
-1
patch/0053-support-pull-image-of-schema1.patch
patch/0053-support-pull-image-of-schema1.patch
+29
-0
patch/series-patch.conf
patch/series-patch.conf
+1
-0
未找到文件。
cmd/isulad_img/utils.go
浏览文件 @
0411cbb5
...
...
@@ -236,8 +236,8 @@ func readAuthFromStdin() (string, string, error) {
return
""
,
""
,
fmt
.
Errorf
(
"error reading authentication: %v"
,
err
)
}
if
err
:=
json
.
Unmarshal
(
line
,
&
authData
);
err
!=
nil
{
return
""
,
""
,
fmt
.
Errorf
(
"error unmarshal authentication: %v"
,
err
)
if
err
2
:=
json
.
Unmarshal
(
line
,
&
authData
);
err2
!=
nil
{
return
""
,
""
,
fmt
.
Errorf
(
"error unmarshal authentication: %v"
,
err
2
)
}
if
authData
.
Username
!=
""
{
...
...
@@ -293,6 +293,12 @@ func getHealthcheck(store cstorage.Store, containerImageName string) (*HealthCon
if
err
!=
nil
{
return
nil
,
err
}
// schema1 doesn't have config blob
if
cb
==
nil
{
return
nil
,
nil
}
config
:=
&
ConfigFromJSON
{}
if
err
:=
json
.
Unmarshal
(
cb
,
config
);
err
!=
nil
{
return
nil
,
err
...
...
iSulad-img.spec
浏览文件 @
0411cbb5
%global _version 2.0.0
%global _release 2020042
0.005423.git3cd302f6
%global _release 2020042
2.083956.git12ad23f0
Name: iSulad-img
Version: %{_version}
Release: %{_release}
...
...
patch/0053-support-pull-image-of-schema1.patch
0 → 100644
浏览文件 @
0411cbb5
From e0b3486880ca376e72c0f721ba1c5510c3e360cd Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Wed, 22 Apr 2020 08:21:59 -0400
Subject: [PATCH] support pull image of schema1
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
vendor/github.com/containers/image/copy/copy.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vendor/github.com/containers/image/copy/copy.go b/vendor/github.com/containers/image/copy/copy.go
index 4d75b65..da119d5 100644
--- a/vendor/github.com/containers/image/copy/copy.go
+++ b/vendor/github.com/containers/image/copy/copy.go
@@ -381,6 +381,11 @@
func (ic *imageCopier) checkLayersDiffIDs(ctx context.Context) error {
return errors.Wrap(err, "Error getting config blob when checking layer's diffIDs")
}
+ // schema1 doesn't have config blob
+ if string(configBytes) == "" {
+ return nil
+ }
+
var config manifest.Schema2Image
if err := json.Unmarshal(configBytes, &config); err != nil {
return errors.Wrapf(err, "Error decoding config %s", string(configBytes))
--
2.19.1
patch/series-patch.conf
浏览文件 @
0411cbb5
...
...
@@ -50,3 +50,4 @@
0050
-
calculate
-
target
-
size
-
if
-
layer
-
blob
-
is
-
symlink
.
patch
0051
-
Get
-
system
-
s
-
real
-
page
-
size
.
patch
0052
-
clean
-
container
-
if
-
save
-
json
-
failed
.
patch
0053
-
support
-
pull
-
image
-
of
-
schema1
.
patch
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录