#trying to debug dagger without using modules does not stop in terminal

1 messages · Page 1 of 1 (latest)

stoic mural
#

i am trying to see if i can start a terminal using the dagger API directly. here is the error

Creating new Engine session... OK!

7   : /home/somoni/.cache/dagger/dagger-0.12.7 session --label dagger.io/sdk.name:go --label dagger.io/sdk.version:0.12.7
1   :   connect DONE [0.5s]
8   :   Container.from(address: "alpine:latest"): Container!
9   :     resolving docker.io/library/alpine:latest
9   :     resolving docker.io/library/alpine:latest DONE [0.2s]
8   :   Container.from DONE [0.2s]
10  :   Container.withExec(args: ["sh", "-c", "echo"]): Container!
11  :   Container.terminal: Container!
12  :     start sh
10  :   Container.withExec(args: ["sh", "-c", "echo"]): Container!
10  :   [0.2s] | 

13  : cache request: pull docker.io/library/alpine:latest
13  : cache request: pull docker.io/library/alpine:latest DONE [0.0s]

7   : /home/somoni/.cache/dagger/dagger-0.12.7 session --label dagger.io/sdk.name:go --label dagger.io/sdk.version:0.12.7
10  :   Container.withExec DONE [0.0s]
11  :   Container.terminal: Container!
12  :     start sh DONE [0.5s]
11  :   Container.terminal ERROR [0.5s]
11  :   ! failed to forward exit code: failed to close terminal: EOF
7   : /home/somoni/.cache/dagger/dagger-0.12.7 session --label dagger.io/sdk.name:go --label dagger.io/sdk.version:0.12.7 DONE [1.3s]

input: container.from.withExec.terminal resolve: failed to forward exit code: failed to close terminal: EOF
nimble glacier
#

Are you using go run main.go? Or dagger run go run main.go?

#

I'd expect the second to work at least

stoic mural
#

i am actually building and executing it so similar to 1. let me try the second approach 2

#

as you expected the second approach works !!!

#

do you think -i should also work ?