isula-build: add repo to local image when output is docker
Signed-off-by: jingxiaolu <lujingxiao@huawei.com>
This commit is contained in:
parent
08a2e11c57
commit
bd20a6e1c1
@ -1 +1 @@
|
|||||||
0.9.5-20
|
0.9.5-21
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
91914cb21b35c8fb6f19bffb964cbf339b2db424
|
ec7c7a741944af0725c3446c6fe09513269a18c7
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: isula-build
|
Name: isula-build
|
||||||
Version: 0.9.5
|
Version: 0.9.5
|
||||||
Release: 20
|
Release: 21
|
||||||
Summary: A tool to build container images
|
Summary: A tool to build container images
|
||||||
License: Mulan PSL V2
|
License: Mulan PSL V2
|
||||||
URL: https://gitee.com/openeuler/isula-build
|
URL: https://gitee.com/openeuler/isula-build
|
||||||
@ -85,6 +85,12 @@ fi
|
|||||||
/usr/share/bash-completion/completions/isula-build
|
/usr/share/bash-completion/completions/isula-build
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 17 2021 jingxiaolu <lujingxiao@huawei.com> - 0.9.5-21
|
||||||
|
- Type:enhancement
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:add repo to local image when output transporter is docker://
|
||||||
|
|
||||||
* Wed Nov 10 2021 DCCooper <1866858@gmail.com> - 0.9.5-20
|
* Wed Nov 10 2021 DCCooper <1866858@gmail.com> - 0.9.5-20
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
From c39db6aff78c1da4d6004c5ea92058121e706092 Mon Sep 17 00:00:00 2001
|
||||||
|
From: xingweizheng <xingweizheng@huawei.com>
|
||||||
|
Date: Wed, 27 Oct 2021 20:13:59 +0800
|
||||||
|
Subject: [PATCH] add repo to local image when output transporter is docker://
|
||||||
|
|
||||||
|
---
|
||||||
|
builder/dockerfile/builder.go | 2 +-
|
||||||
|
builder/dockerfile/builder_test.go | 4 ++--
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/builder/dockerfile/builder.go b/builder/dockerfile/builder.go
|
||||||
|
index df8c6ce..7fff71b 100644
|
||||||
|
--- a/builder/dockerfile/builder.go
|
||||||
|
+++ b/builder/dockerfile/builder.go
|
||||||
|
@@ -627,7 +627,7 @@ func parseOutputTag(output string) string {
|
||||||
|
if repo == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
- tag = repoAndTag[len(repo):]
|
||||||
|
+ tag = strings.TrimLeft(repoAndTag, "/")
|
||||||
|
}
|
||||||
|
|
||||||
|
return tag
|
||||||
|
diff --git a/builder/dockerfile/builder_test.go b/builder/dockerfile/builder_test.go
|
||||||
|
index c2fec6c..20cca43 100644
|
||||||
|
--- a/builder/dockerfile/builder_test.go
|
||||||
|
+++ b/builder/dockerfile/builder_test.go
|
||||||
|
@@ -1300,12 +1300,12 @@ func TestParseTag(t *testing.T) {
|
||||||
|
{
|
||||||
|
name: "docker output",
|
||||||
|
output: "docker://localhost:5000/isula/test:latest",
|
||||||
|
- tag: "isula/test:latest",
|
||||||
|
+ tag: "localhost:5000/isula/test:latest",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "docker output",
|
||||||
|
output: "docker://localhost:5000/isula/test",
|
||||||
|
- tag: "isula/test",
|
||||||
|
+ tag: "localhost:5000/isula/test",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "invalid docker output",
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -53,3 +53,4 @@ patch/0087-bugfix-optimize-function-IsExist.patch
|
|||||||
patch/0088-bugfix-loaded-images-cover-existing-images-name-and-.patch
|
patch/0088-bugfix-loaded-images-cover-existing-images-name-and-.patch
|
||||||
patch/0089-isula-build-fix-panic-when-using-image-ID-to-save-se.patch
|
patch/0089-isula-build-fix-panic-when-using-image-ID-to-save-se.patch
|
||||||
patch/0090-enhancement-add-log-info-to-show-the-image-layer-num.patch
|
patch/0090-enhancement-add-log-info-to-show-the-image-layer-num.patch
|
||||||
|
patch/0091-add-repo-to-local-image-when-output-transporter-is-d.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user