Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interactive app work on Docker-less hosts too #6

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions pkg/app/master/command/cliprompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import (

"github.com/mintoolkit/mint/pkg/app"
"github.com/mintoolkit/mint/pkg/app/master/config"
"github.com/mintoolkit/mint/pkg/docker/dockerclient"
"github.com/mintoolkit/mint/pkg/docker/dockerutil"
"github.com/mintoolkit/mint/pkg/util/errutil"
"github.com/mintoolkit/mint/pkg/util/fsutil"
"github.com/mintoolkit/mint/pkg/version"
)

type InteractiveApp struct {
Expand All @@ -41,20 +37,6 @@ func NewInteractiveApp(app *cli.App, gparams *GenericParams) *InteractiveApp {
},
}

client, err := dockerclient.New(gparams.ClientConfig)
if err == dockerclient.ErrNoDockerInfo {
exitMsg := "missing Docker connection info"
if gparams.InContainer && gparams.IsDSImage {
exitMsg = "make sure to pass the Docker connect parameters to the mint app container"
}
fmt.Printf("mint: info=docker.connect.error message='%s'\n", exitMsg)
fmt.Printf("mint: state=exited version=%s location='%s'\n", version.Current(), fsutil.ExeDir())
os.Exit(-777)
}
errutil.FailOn(err)

ia.dclient = client

ia.appPrompt = prompt.New(
ia.execute,
ia.complete,
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/master/command/debug/handle_containerd_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package debug
import (
"fmt"
"os"
"strings"

//"time"
"context"
"os/signal"
Expand Down Expand Up @@ -249,7 +251,7 @@ func HandleContainerdRuntime(

//TODO: pull only if the image doesn't exist
//TODO: expand the image path for short docker image paths
if !strings.Contains(commandParams.DebugContainerImage,"/") {
if !strings.Contains(commandParams.DebugContainerImage, "/") {
//a hacky way to ensure full paths for containerd :)
commandParams.DebugContainerImage = fmt.Sprintf("docker.io/library/%s", commandParams.DebugContainerImage)
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/src.build.quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BUILD_TIME="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
TAG="current"
REVISION="current"
if hash git 2>/dev/null && [ -e $BDIR/.git ]; then
TAG="$(git describe --tags)"
TAG="$(git describe --tags --always)"
REVISION="$(git rev-parse HEAD)"
fi

Expand Down
Loading