thelounge/thelounge-docker

no editor in the container: user edition via command line fails

iamdey opened this issue · 4 comments

How to reproduce:

  1. configure thelounge to start in private mode
module.exports = {
  public: false,
  // ...
}
  1. run a container (I run it via docker-compose)
  2. add a user (I didn't test this part, I imported a backup)
  3. 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.

does docker ship with a cli editor? If so, this is an easy fix.

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.

This issue is happening because vim isn't being found. Can you install vim on your system? (Or set the $EDITOR environment variable)

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