#dagger shell example
1 messages · Page 1 of 1 (latest)
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
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.
seems like you're not using dagger functions
this only applies to dagger modules (https://docs.dagger.io/zenith/) which is a current experimental feature of Dagger
that's why the dagger shell command is hidden in the CLI
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
Have a look at the zenith quickstart in https://github.com/dagger/dagger/pull/6262, it has an example that might be helpful