From 60624f948bf0067059f3d05e1bdc54589a9911e9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 14 Apr 2020 13:31:29 +0200 Subject: podmanV2: implement build Implement `podman build` for the local client. The remote client will require some rather large work in the backend and a new build endpoint for the libpod rest API. Signed-off-by: Valentin Rothberg --- pkg/domain/infra/abi/images.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/domain/infra/abi') diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index 9467c14d4..0f710ad28 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -468,3 +468,11 @@ func (ir *ImageEngine) Search(ctx context.Context, term string, opts entities.Im func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) { return ir.Libpod.GetConfig() } + +func (ir *ImageEngine) Build(ctx context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) { + id, _, err := ir.Libpod.Build(ctx, opts.BuildOptions, containerFiles...) + if err != nil { + return nil, err + } + return &entities.BuildReport{ID: id}, nil +} -- cgit v1.2.3-54-g00ecf