How to Docker

Discussion about Docker
Locked
User avatar
sonicj
Posts: 2
Joined: 06 Nov 2021, 19:50

How to Docker

Post by sonicj »

I am new to docker containers and I am trying to use this docker image here https://hub.docker.com/r/nathanls/insight

I started off by installing docker on my nas. I then found the image in the registry and downloaded it. I then launch it and under general settings choose enable and enable automatic restart. I go to volume and add a directory ( i have tried admin, public and appdata ). I am not sure what goes in the loading path if anything. Once I click apply, it shows up under containers. It runs for a few seconds and restarts. It repeats this several times and then just stops. During that time I never see the path I chose under the volume when looking at the details. After it fails I get this in the logs:
The config file 'config.ini' could not be found. Rename file 'default-config.ini' to 'config.ini'. If you are using Insight with Docker make sure to check your volume directory, rename the 'default-config.ini' to 'config.ini', and populate the configuration values.
So next I looked at the instructions of the image at the first of my post and think that maybe I need to putty into the nas and just run those commands. I do that and default-config.ini is created in the directory i navigated to and ran the command in. I then configure the ini file per the instructions and change the name.

When i tell docker to run in putty I get the following:
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/create?name=insight: dial unix /var/run/docker.sock: connect: permission denied.
I then went back to the docker application in the nas gui. I try to create a container again, pointing to the directory where I created the .ini file. I still get the same error about not finding the .ini file.

Can anyone point me in the right direction? My Nas is the F2-221
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: How to Docker

Post by TMSupport »

The specific method of using the image requires you to find the relevant information yourself. This image is more complicated and is not recommended for novices. We can only help you find the 'config.ini' file, the method is as follows:
1. Log in to the TNAS terminal: viewtopic.php?f=75&t=2350
2. Enter the docker directory

Code: Select all

cd /mnt/md0/appdata/docker/ 
3. Find the default-config.ini file

Code: Select all

find ./ -name "default-config.ini"

4. Enter the directory where default-config.ini is located
cd ./btrfs/subvolumes/25a127430f078f1b5c4c07bee52ae2e36f9a98997317ed6a1001bb8569423a45/InsightDocker/Insight/

5. Change the file name

Code: Select all

mv default-config.ini config.ini

6. Edit the configuration file and write the necessary configuration information

Code: Select all

vi config.ini
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
sonicj
Posts: 2
Joined: 06 Nov 2021, 19:50

Re: How to Docker

Post by sonicj »

Thank you for your reply. The find command is what I needed. Once I saw where docker directories where I was able to get it from there.

For anyone else with this or something similar here is what I did. I created a folder in the appdata/docker/btrfs/subvolumes called Insight. The full path is /mnt/md0/appdata/docker/btrfs/subvolumes/Insight). I then used putty to connect to my nas, navigated to the directory I created and ran the command from https://hub.docker.com/r/nathanls/insight, modified the config.ini, checked for updates and started insight.

I had an isssue here with permissions on the docker daemon. Sudo would not work. I ended up creating a docker group and adding the user to it. Restarted and got access to finish.

Thanks again for the reply. It put me in the right direction.
Locked