Push client support
Update dist tool to use client package Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
8
cmd/dist/common.go
vendored
8
cmd/dist/common.go
vendored
@@ -13,6 +13,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/containerd/console"
|
||||
"github.com/containerd/containerd"
|
||||
contentapi "github.com/containerd/containerd/api/services/content"
|
||||
imagesapi "github.com/containerd/containerd/api/services/images"
|
||||
"github.com/containerd/containerd/content"
|
||||
@@ -47,6 +48,13 @@ var registryFlags = []cli.Flag{
|
||||
},
|
||||
}
|
||||
|
||||
func getClient(context *cli.Context) (*containerd.Client, error) {
|
||||
address := context.GlobalString("address")
|
||||
//timeout := context.GlobalDuration("connect-timeout")
|
||||
|
||||
return containerd.New(address)
|
||||
}
|
||||
|
||||
func resolveContentStore(context *cli.Context) (content.Store, error) {
|
||||
root := filepath.Join(context.GlobalString("root"), "content")
|
||||
if !filepath.IsAbs(root) {
|
||||
|
||||
Reference in New Issue
Block a user