thelounge/thelounge-docker

Document (or fix?) how to install themes in Docker

ih8ms opened this issue · 1 comments

ih8ms commented

The whole docker container (except for THELOUNGE_HOME of course) is read only (I guess this is because it's inherited from the node container, I haven't checked). This way you can't install themes using the default command thelounge install thelounge-theme-ion inside the container because yarn is unable to find a writeable cache folder.

The easiest way to work around this is to create a temp folder (let's say /var/opt/thelounge/temp) and execute the installation like this: YARN_CACHE_FOLDER=/var/opt/thelounge/temp thelounge install thelounge-theme-ion

As the container has to be restarted for Thelounge to recognize the new theme anyway, another option could be to mount the /tmp folder into the container once for installation and delete the volume afterwards. I haven't checked this particular approach but it should work as well.

xPaw commented

I think a better fix would be to just pass --cache-folder into the Yarn command that The Lounge executes here:
https://github.com/thelounge/thelounge/blob/589e846b739f465dde21afe5933e8a133f8e21ab/src/command-line/install.js#L56-L66

Set it to ${packagesPath}/yarn_cache/ or something like that so it's in the same parent folder as the node_modules.

That way it will work in Docker, and any other system that happens to restrict access.