no editor in the container: user edition via command line fails
iamdey opened this issue · 4 comments
iamdey commented
How to reproduce:
- configure thelounge to start in private mode
module.exports = {
public: false,
// ...
}
- run a container (I run it via docker-compose)
- add a user (I didn't test this part, I imported a backup)
- try to edit it (
thelounge_1
is the container name):
docker exec -it thelounge_1 lounge edit foobar
The previous command fails:
2016-11-30 22:16:32 [ERROR] Unable to open /home/lounge/data/users/foobar.json. $EDITOR is not set, and vi was not found.
MaxLeiter commented
does docker ship with a cli editor? If so, this is an easy fix.
iamdey commented
I didn't heard about this kind of feature. I usually install it in the Dockerfile, but in this case of a node base image, I have no idea.
MaxLeiter commented
This issue is happening because vim isn't being found. Can you install vim on your system? (Or set the $EDITOR environment variable)
iamdey commented
vim is not installed IN the container (the host is ok).
Well I though it will be more difficult, node image is a debian based image, so a simple:
RUN apt-get update && apt-get install -y vim
in the Dockerfile will do the trick