Skip to content

Commit

Permalink
chore(pkg/cr/containerd) remove buildkit import
Browse files Browse the repository at this point in the history
Signed-off-by: Ayan Choudhary <[email protected]>
  • Loading branch information
ayanchoudhary committed Mar 28, 2022
1 parent 037b351 commit d34a888
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/cr/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/images"
"github.com/moby/buildkit/client"
)

var LogBuffers map[string]*cio.Creator
Expand Down Expand Up @@ -119,7 +118,7 @@ func (self *ContainerdClient) ContainerLogs(ctx context.Context, containerId str
return "", nil
}

config := io.Config()
_ = io.Config()
// TODO: persist IO from container task and output logs here
return "", nil
}
Expand All @@ -139,19 +138,20 @@ func (self *ContainerdClient) ContainerCommit(ctx context.Context, containerId s

// TODO: add buildkit and handle image related operations
func (self *ContainerdClient) ImageBuild(ctx context.Context, builderContext io.Reader, options ImageBuildOptions) (*bytes.Buffer, error) {
var image images.Image
// var image images.Image

builder, err := client.New(ctx, "//TODO: buildkit daemon address", client.WithFailFast())
if err != nil {
return nil, err
}
// builder, err := client.New(ctx, "//TODO: buildkit daemon address", client.WithFailFast())
// if err != nil {
// return nil, err
// }

ch := make(chan *client.SolveStatus)
_, err = builder.Build(ctx, *solveOpt, "", dockerfile.Build, ch)
// ch := make(chan *client.SolveStatus)
// _, err = builder.Build(ctx, *solveOpt, "", dockerfile.Build, ch)

imageStore := self.client.ImageService()
image, err = imageStore.Create(ctx, image)
return nil, err
// imageStore := self.client.ImageService()
// image, err = imageStore.Create(ctx, image)
// return nil, err
return nil, nil
}

func (self *ContainerdClient) ImageRemove(ctx context.Context, imageId string, options ImageRemoveOptions) error {
Expand Down

0 comments on commit d34a888

Please sign in to comment.