lazydocker
lazydocker copied to clipboard
error editing config
Hi there! First, thanks for the nice tool!
I run into the issue when I tried to change the configure. By pressing "o" i get the error
"exec: "sh": executable file not found in $PATH
Did i missed something? I'm using lazydocker in a docker.
System: lazyteam/lazydocker:latest ubuntu 18.04 docker: Docker version 19.03.2, build 6a30dfc
Thanks! pix_1
EDIT: This not happen when using the binary version.
@qdm12 any ideas on that?
It's because the binary is on a Scratch image so there is no shell. What program does lazydocker use to modify the configure? Maybe we can incorporate it in Go? Otherwise we can have the go binary on Alpine which should solve the problem but it's less fancy.
https://github.com/jesseduffield/lazydocker/blob/a3b3c94ed2c09e898bf2885a59ada921a318d585/pkg/commands/os.go#L127-L168
c.Config.UserConfig.OS.OpenCommand defaults to xdg-open on linux.
Maybe put a statically built xdg-open binary next to lazydocker in the scratch image? I'm away from keyboard but I'll check later.
EDIT: I'm looking into it now, I might have an ugly solution to copy paste xdg-open from an Alpine image to /bin.
When you try to edit the configuration with e, it also fails with this error. I will try to add a static build of vi to see if it works out.
Concerning o to open the config file, I end up here but I'm not sure where to look now, some help would be appreciated 😄
Should we simply let the user modify the config by bind mounting it on the Docker host?
@qdm12 I think bind mounting is a good solution.
As for your question about the OpenFile config option, happy to give guidance but I'm not sure what you're looking for haha
Open in nano or vim?
@meteoro could you please clarify what is the question?