#dagger shell example

1 messages · Page 1 of 1 (latest)

steady spear
#

hello, do you have an example project that works with dagger shell that I can look at?

unborn dock
#

so, you can dagger shell against any function that retuns a *Container. i.e:

type Foo struct{}

// example usage: "dagger call container-echo --string-arg yo"
func (m *Foo) Alpine(ctx context.Context) *Container {
    return dag.Container().From("alpine")
}

you can then do dagger shell alpine and it will drop in a shell withint that container

steady spear
#

I get an error "no module specified and no default module found in current directory" that perhaps indicates that I don't know what I'm doing.

unborn dock
#

seems like you're not using dagger functions

#

that's why the dagger shell command is hidden in the CLI

steady spear
#

I had a thought to bind to a local service that accepts commands or maybe just connects to a running netcat just so I could more easily inspect the container.. I'll have to look at zenith some more, I guess

prime yew