zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.32k stars 645 forks source link

Running in container #1057

Open scabala opened 2 years ago

scabala commented 2 years ago

Hello, first of all, I would like to sincerely thank you for all your work that made zellij real. That's really something to look up to.

I am curious if anyone is using zellij inside containerized environments? I am considering such scenario but I do not know it that's possible at all.

What I am actually doing:

The erro I get is:

Originating Thread(s):

Error: thread 'router' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })': /project/zellij-utils/src/ipc.rs:168
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>

I want to my development experience in containers to be "semaless" - attaching to different (containerized) workspaces from host and run commands in containers should be doable. However, I assume that zellij was not designed to work like that so it might not be possible at all.

I am not experienced in Rust so not able to help with coding but I am willing to test different approaches.

jaeheonji commented 2 years ago

Hi, @scabala! Thank you for your interest 😄

I did some tests. and I think this is zellij bug. To find the problem, It will take time but thank you for the report!

scabala commented 2 years ago

Hi @jaeheonji thanks for the rapid reply! I did not mention this but it would be also beneficial to include some flag for zellij server mode lik --foreground or --no-daemon to not fork into background. That would make running zellij as main process in container much easier. Should I create different issue for it?

jaeheonji commented 2 years ago

Yes! That's a good idea. If you make it a feature Issue, I'll label it 😄

scabala commented 2 years ago

Cool, this is the issue: https://github.com/zellij-org/zellij/issues/1062 :smile:

queil commented 3 months ago

I got sort of sessions working in containers by settings the XDG_RUNTIME_DIR=/tmp globally in the container image. I don't manually run zellij --server but in my exec I just have ["bash", "-c", "zellij --session rooz || zellij attach rooz"] - so it either starts a session or it attaches if it already exists where I enter the container.

EDIT: although I don't run zellij on the host - so a slightly different use case.