How do I install packages inside app container on Scale?

rokyo401

Cadet
Joined
Sep 12, 2023
Messages
1
Hello,

I am currently running into the problem that in my TrueNAS I have Collabora installed as an app and I have to change its config file but when I go into a shell on the Collabora container, there is no editor installed with which to edit it. I also cannot install vim or vi or nano because there was no way to configure a root account for this container during the app's installation. So I cannot `apt install nano` at all.

Is there a way to install some kind of editor inside the app container without root?

In the Nextcloud app, when I go into a shell, I already am root. But in Collabora I'm user "cool"... any chance for me to edit this config file in there?

Thanks!
 

majorgear

Dabbler
Joined
Mar 13, 2012
Messages
36
The most reliable way is to create custom docker images for your apps that are the base image plus additional applications or files you want them to have.

I recently did this for an app I use that I wanted to have additional packages.

Basically,
set up a private docker registry
create a custom docker image
push the image to your registry
creates custom trunenas app that used your image.


Done!
 

chmod777

Dabbler
Joined
Oct 27, 2023
Messages
13
I've not set up truenas scale yet (very soon) but I do have a lot of experience debugging docker and kubernetes. With kubernetes, you can attach a debug container to a running pod. If you're just using docker if you can modify the start command to include a volume map '-v /home/username:/path/to/config' to the directory with the file you need to change you can edit on the host and from within the container copy it to where you need. Another option is to download a nano or vim binary compatible with your container OS and then map that into your container using the volume mount -v command. You can then edit the file. However, since you do not have root access, if the file is root owned inside of your container, you're out of luck.
 
Top