Jump to content
schford

Install a Docker thats not in Apps

10 posts in this topic Last Reply

Recommended Posts

Hi guys,

 

I have searched and googled but just cant get my head around how to install nxfilter. properly - https://hub.docker.com/r/packetworks/nxfilter-base

 

I have it installed and working but for the life of me I just cant finger out how to get persistent storage working.

 

I would be really grateful for any advice as I just cant seem to work  it out!

 

Thanks

 

Stuart

Share this post


Link to post

If this doesn't work, you need to contact the docker container author and ask I guess

2019-02-10_20-26.png.7852a63ca16777454afbb309e00ae623.png

Share this post


Link to post

Hi guys,

 

sorry to take so long to come back and thanks for the advice.  SO I edited the docker container and the resulting command run looked like this  

 

"root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='nxfilter' --net='bond0' --ip='192.168.0.17' --privileged=true -e TZ="Europe/London" -e HOST_OS="Unraid" -v '/mnt/cache/appdata/nxfilter/conf/':'/nxfilter/conf':'rw' -v '/mnt/cache/appdata/nxfilter/log':'/nxfilter/log':'rw' -v '/mnt/cache/appdata/nxfilter/db/':'/nxfilter/db':'rw' 'packetworks/nxfilter-base:latest' 

e1a26f37b99126b3cdaec315597a7096a3e59cf24fdbad48f1835ebd30055916"

 

The appropraite folders get created in my app data but when the docker tries to start i know get

 

"Exception in thread "main" java.lang.NullPointerException
at nxd.Main.<init>(Unknown Source)
at nxd.Main.main(Unknown Source)
Exception in thread "Thread-0" java.lang.NullPointerException
at nxd.o.run(Unknown Source)"

 

I would be incredibly grateful for any advice please!

 

Thanks

 

Stuart

 

 

Share this post


Link to post

I know this is a bit of a zombie thread, but I recently ran into the same thing and thought I'd post here for anyone else who's having trouble with this docker.

 

The reason that the nxfilter-base docker throws the Java exception seems to be that it's not able to deal with an empty conf folder. In unRAID-land we're used to dockers which will populate their /conf folders with default configuration when they're empty on first startup. Whether it's intended or not, that doesn't seem to work with this docker. When you don't map any host folders to the container's /nxfilter/conf then it starts up and uses the configuration files in the image itself.

 

My quick hackey solution was just to start the docker with all the port and folder mapings *except* the /nxfilter/conf one. I temporarily mapped /mnt/user/appdata/nxfilter/conf : /tmp/conf, and connected to the container using docker exec -it <container-id> /bin/bash. Then I just got the default config out of the image and into my host with a cp -r /nxfilter/conf/* /tmp/conf, stopped the container, deleted the temporary mapping, and added the usual /mnt/user/appdata/nxfilter/conf : /nxfilter/conf. After that, it fired up no problem.

 

Hope someone finds this useful.

 

-A

Share this post


Link to post

@Ambrotos I suspect the reason is a (not as widely known as it should be) difference in the way volumes and bind mounts work in docker. When a docker volume is created for a non-empty directory in a container, the volume is populated with the files in the containers directory. On the other hand if a host folder is bind-mounted to a non-empty directory in a docker container the bind-mounted folder replaces the container folder completely. Here is a link to the docker documentation explaining in more detail. Since unRAID users are encouraged to use bind mounts to the appdata folder rather than volumes this issue occasionally crops up. Especially for docker containers that were build with microservice or cluster usage in mind since those applications most often stay away from bind mounting to make containers services more portable between host nodes.

Share this post


Link to post

Hm. You're probably right. I was never super clear on the difference between volumes and binds. Thanks for the clarification!

 

-A

Share this post


Link to post
On 1/31/2020 at 12:25 PM, Ambrotos said:

<snip>

 

Hope someone finds this useful.

 

-A

I did - thanks!

Does nxfilter work fine for you in Bridge mode?

Share this post


Link to post
Posted (edited)

I think reply there will get people who has the experience with nxfilter docker share their thoughts

steps that I took:

 

0. Stop AdGuard, stopped docker and restart the docker without AdGuard auto start.

1. in console,

Quote

docker pull packetworks/nxfilter-base

2. create a container (see screenshot)

I set port 53 to UDP. All other ports are TCP. 

according to this instruction.

https://hub.docker.com/r/packetworks/nxfilter-base

NxFilter_Q1.thumb.JPG.24acdb322de19ab319f90bbc6ffdea59.JPG

 

3. the container creation was successful but, there is no IP mapping.

Quote

docker run -d --name='NxFilter' --net='br0' --ip='192.168.1.6' --privileged=true -e TZ="America/####" -e HOST_OS="Unraid" -v '/mnt/user/appdata/nxfilter/log/':'/nxfilter/log':'rw' -v '/mnt/user/appdata/nxfilter/db/':'/nxfilter/db':'rw' -v '/mnt/user/appdata/nxfilter/conf/':'/nxfilter/conf':'rw' 'packetworks/nxfilter-base' 

NxFilter_Q2.thumb.JPG.b3dcb28bc4476c43028fd724ddbc2fd0.JPG

no IP and port mapping.

 

AdGuard shows the correct port mapping

NxFilter_Q3.thumb.JPG.888347d99698460ef82354fe3cb08177.JPG

 

I have only one physical ethernet port on motherboard.

I previously get AdGuard (from Unraid APP) working properly by setting fixed IP to 192.168.1.5. 

 

 

 

 

 

Edited by jena

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.