mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #10025 from zhangguanzhang/remote-save-dir
Fixes podman-remote save to directories does not work
This commit is contained in:
@ -270,6 +270,16 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if format is dir, server will save to an archive
|
||||||
|
// the client will unArchive after receive the archive file
|
||||||
|
// so must convert is at here
|
||||||
|
switch query.Format {
|
||||||
|
case define.OCIManifestDir:
|
||||||
|
query.Format = define.OCIArchive
|
||||||
|
case define.V2s2ManifestDir:
|
||||||
|
query.Format = define.V2s2Archive
|
||||||
|
}
|
||||||
|
|
||||||
switch query.Format {
|
switch query.Format {
|
||||||
case define.V2s2Archive, define.OCIArchive:
|
case define.V2s2Archive, define.OCIArchive:
|
||||||
tmpfile, err := ioutil.TempFile("", "api.tar")
|
tmpfile, err := ioutil.TempFile("", "api.tar")
|
||||||
|
@ -79,7 +79,7 @@ var _ = Describe("Podman save", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman save to directory with oci format", func() {
|
It("podman save to directory with oci format", func() {
|
||||||
if rootless.IsRootless() && podmanTest.RemoteTest {
|
if rootless.IsRootless() {
|
||||||
Skip("Requires a fix in containers image for chown/lchown")
|
Skip("Requires a fix in containers image for chown/lchown")
|
||||||
}
|
}
|
||||||
outdir := filepath.Join(podmanTest.TempDir, "save")
|
outdir := filepath.Join(podmanTest.TempDir, "save")
|
||||||
@ -90,7 +90,7 @@ var _ = Describe("Podman save", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman save to directory with v2s2 docker format", func() {
|
It("podman save to directory with v2s2 docker format", func() {
|
||||||
if rootless.IsRootless() && podmanTest.RemoteTest {
|
if rootless.IsRootless() {
|
||||||
Skip("Requires a fix in containers image for chown/lchown")
|
Skip("Requires a fix in containers image for chown/lchown")
|
||||||
}
|
}
|
||||||
outdir := filepath.Join(podmanTest.TempDir, "save")
|
outdir := filepath.Join(podmanTest.TempDir, "save")
|
||||||
|
Reference in New Issue
Block a user