summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-22 12:00:58 +0200
committerGitHub <noreply@github.com>2020-05-22 12:00:58 +0200
commit72f87e6808e991b1ca761e46de82fe0d13c76d6d (patch)
tree685693a1cc9e988784e306b39a6664dc95813f19 /pkg/domain
parent7b2627e7df715c63ab36555a03a65b47efbec0a5 (diff)
parent845a795a7a1666fb8af2abc6ce93c7152f06a9b9 (diff)
downloadpodman-72f87e6808e991b1ca761e46de82fe0d13c76d6d.tar.gz
podman-72f87e6808e991b1ca761e46de82fe0d13c76d6d.tar.bz2
podman-72f87e6808e991b1ca761e46de82fe0d13c76d6d.zip
Merge pull request #6327 from baude/v2build
v2 podman-remote build
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/tunnel/images.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 3d5626c45..c300e74d0 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -4,6 +4,7 @@ import (
"context"
"io/ioutil"
"os"
+ "path"
"strings"
"github.com/containers/common/pkg/config"
@@ -13,6 +14,7 @@ import (
"github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/domain/utils"
utils2 "github.com/containers/libpod/utils"
+ "github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
)
@@ -265,7 +267,14 @@ func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) {
}
func (ir *ImageEngine) Build(ctx context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) {
- return nil, errors.New("not implemented yet")
+ if len(containerFiles) > 1 {
+ return nil, errors.New("something")
+ }
+ tarfile, err := archive.Tar(path.Base(containerFiles[0]), 0)
+ if err != nil {
+ return nil, err
+ }
+ return images.Build(ir.ClientCxt, containerFiles, opts, tarfile)
}
func (ir *ImageEngine) Tree(ctx context.Context, nameOrId string, opts entities.ImageTreeOptions) (*entities.ImageTreeReport, error) {