mirror of
https://github.com/containers/podman.git
synced 2025-06-29 15:08:09 +08:00
podman-remote build
add the ability to build images using files local to the remote-client but over a varlink interface to a "remote" server. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -3,11 +3,14 @@ package varlinkapi
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/buildah"
|
||||
"github.com/containers/libpod/cmd/podman/shared"
|
||||
"github.com/containers/libpod/cmd/podman/varlink"
|
||||
"github.com/containers/libpod/libpod"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
)
|
||||
|
||||
// getContext returns a non-nil, empty context
|
||||
@ -133,3 +136,27 @@ func handlePodCall(call iopodman.VarlinkCall, pod *libpod.Pod, ctrErrs map[strin
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func stringCompressionToArchiveType(s string) archive.Compression {
|
||||
switch strings.ToUpper(s) {
|
||||
case "BZIP2":
|
||||
return archive.Bzip2
|
||||
case "GZIP":
|
||||
return archive.Gzip
|
||||
case "XZ":
|
||||
return archive.Xz
|
||||
}
|
||||
return archive.Uncompressed
|
||||
}
|
||||
|
||||
func stringPullPolicyToType(s string) buildah.PullPolicy {
|
||||
switch strings.ToUpper(s) {
|
||||
case "PULLIFMISSING":
|
||||
return buildah.PullIfMissing
|
||||
case "PULLALWAYS":
|
||||
return buildah.PullAlways
|
||||
case "PULLNEVER":
|
||||
return buildah.PullNever
|
||||
}
|
||||
return buildah.PullIfMissing
|
||||
}
|
||||
|
Reference in New Issue
Block a user