diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 122b87f7cc..6a78d639e4 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "os" + "path/filepath" "github.com/flyteorg/flytectl/pkg/docker" @@ -67,19 +68,25 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } if len(sandboxConfig.DefaultConfig.Source) > 0 { + source, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) + if err != nil { + return nil, err + } docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, + Source: source, Target: docker.FlyteSnackDir, }) } + fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) os.Setenv("KUBECONFIG", docker.Kubeconfig) os.Setenv("FLYTECTL_CONFIG", docker.FlytectlConfig) if err := docker.PullDockerImage(ctx, cli, docker.ImageName); err != nil { return nil, err } + fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() ID, err := docker.StartContainer(ctx, cli, docker.Volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) if err != nil {