summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-04-14 13:31:29 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-04-17 10:26:50 +0200
commit60624f948bf0067059f3d05e1bdc54589a9911e9 (patch)
tree995b11c25b4abaef99ced55cf1eaf4ed4df73bb0 /pkg/domain/entities
parent0d2b5532c417c58bd24e71a56c5c55b43e423a59 (diff)
downloadpodman-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/entities')
-rw-r--r--pkg/domain/entities/engine_image.go1
-rw-r--r--pkg/domain/entities/types.go12
2 files changed, 13 insertions, 0 deletions
diff --git a/pkg/domain/entities/engine_image.go b/pkg/domain/entities/engine_image.go
index e3b606550..052e7bee5 100644
--- a/pkg/domain/entities/engine_image.go
+++ b/pkg/domain/entities/engine_image.go
@@ -7,6 +7,7 @@ import (
)
type ImageEngine interface {
+ Build(ctx context.Context, containerFiles []string, opts BuildOptions) (*BuildReport, error)
Config(ctx context.Context) (*config.Config, error)
Delete(ctx context.Context, nameOrId []string, opts ImageDeleteOptions) (*ImageDeleteReport, error)
Diff(ctx context.Context, nameOrId string, options DiffOptions) (*DiffReport, error)
diff --git a/pkg/domain/entities/types.go b/pkg/domain/entities/types.go
index 31a05f5d3..e4e1c3ad2 100644
--- a/pkg/domain/entities/types.go
+++ b/pkg/domain/entities/types.go
@@ -4,6 +4,7 @@ import (
"errors"
"net"
+ "github.com/containers/buildah/imagebuildah"
"github.com/containers/libpod/libpod/events"
"github.com/containers/libpod/pkg/specgen"
"github.com/containers/storage/pkg/archive"
@@ -104,3 +105,14 @@ func (e ErrorModel) Cause() error {
func (e ErrorModel) Code() int {
return e.ResponseCode
}
+
+// BuildOptions describe the options for building container images.
+type BuildOptions struct {
+ imagebuildah.BuildOptions
+}
+
+// BuildReport is the image-build report.
+type BuildReport struct {
+ // ID of the image.
+ ID string
+}