A while back we had a util that dropped you into an shell with an arbitrary buildkit FS mounted, core of the implementation here: https://github.com/dagger/cloak/blob/561153a1f499948f9593fedf6a8b8603e1939d57/engine/engine.go#L126-L142
This was extremely useful at the time for debugging. Without it, you usually have to submit execops that operate essentially as println debug statements.
We should re-add this util. To start very simple, we can just support the ability to drop into a shell at a given FSID when using the cloak CLI. Further enhancements after that include:
- The ability to drop into a failed exec (including the changes made during the failure). While undocumented, Buildkit supports this: https://github.com/moby/buildkit/blob/c9a0f4d2de095591e742d7f411d9ed36a03a1c4e/client/build_test.go#L1278-L1310
- The ability to drop into a shell when running a script (perhaps with a
CLOAK_DEBUG_SHELL=true env var or something)
- The ability to access the shell from a web browser. This requires exposing it over a more generic protocol directly from the cloak engine. One possible path to approaching this is with websockets, as mentioned here.
A while back we had a util that dropped you into an shell with an arbitrary buildkit FS mounted, core of the implementation here: https://github.com/dagger/cloak/blob/561153a1f499948f9593fedf6a8b8603e1939d57/engine/engine.go#L126-L142
This was extremely useful at the time for debugging. Without it, you usually have to submit execops that operate essentially as println debug statements.
We should re-add this util. To start very simple, we can just support the ability to drop into a shell at a given FSID when using the
cloakCLI. Further enhancements after that include:CLOAK_DEBUG_SHELL=trueenv var or something)