diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-04-14 13:31:29 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-04-17 10:26:50 +0200 |
commit | 60624f948bf0067059f3d05e1bdc54589a9911e9 (patch) | |
tree | 995b11c25b4abaef99ced55cf1eaf4ed4df73bb0 /pkg/domain/infra | |
parent | 0d2b5532c417c58bd24e71a56c5c55b43e423a59 (diff) | |
download | podman-60624f948bf0067059f3d05e1bdc54589a9911e9.tar.gz podman-60624f948bf0067059f3d05e1bdc54589a9911e9.tar.bz2 podman-60624f948bf0067059f3d05e1bdc54589a9911e9.zip |
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 <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/images.go | 8 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 4 |
2 files changed, 12 insertions, 0 deletions
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 +} diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 7d40e0327..6ea2bd9f2 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -259,3 +259,7 @@ func (ir *ImageEngine) Search(ctx context.Context, term string, opts entities.Im func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) { return config.Default() } + +func (ir *ImageEngine) Build(ctx context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) { + return nil, errors.New("not implemented yet") +} |