Adding adr plugin to server in docker

Hey,
I am trying to include my own ADR plugin to my chirpstack server that I am running in docker.
I am using image from chirpstack website https://hub.docker.com/r/chirpstack/chirpstack-network-server
I have compiled the ADR example from repository and moved it to ./test directory relative to the server directory. Next I added line in docker-compose-yml:

    volumes:
      - ./configuration/chirpstack:/etc/chirpstack
      - ./lorawan-devices:/opt/lorawan-devices
      - ./test:/test

and added position to the region_eu868.toml in region.network section

    adr_plugins=[
    "/test/adr-plugin",
    ]

where adr-plugin is the binary located in test directory

After all of these steps there is no additional ADR plugin to choose from besides the default ones.

EDIT:
I tried to move the adr_plugins section to the main config - chirpstack.toml under enabled_regions part in [network] section and got these logs:

chirpstack_1                       | 2023-07-06T09:48:32.935091Z  INFO
 chirpstack::adr: Setting up adr algorithms
chirpstack_1                       | 2023-07-06T09:48:32.935105Z  INFO
 chirpstack::adr: Setting up ADR plugin file_path=/test/adr-plugin
chirpstack_1                       | Error: Read ADR plugin
chirpstack_1                       |
chirpstack_1                       | Caused by:
chirpstack_1                       |     stream did not contain valid UTF-8
chirpstack-docker_chirpstack_1 exited with code 1

Strange cuz the path is included as strings (in double quotes)

Okay, the first issue was that I was using chirpstack v4 instead of v3. Now I am using v3 version (branch v3) and now I get this error:

chirpstack-network-server_1      | 2023-07-06T13:15:15.053Z [DEBUG] plugin: starting plugin: path=/test/adr-plugin args=[/test/adr-plugin]
chirpstack-network-server_1      | time="2023-07-06T13:15:15.0538812Z" level=fatal msg="setup adr error: plugin rpc client error: fork/exec /test/adr-plugin: no such file or directory"

with volume:

    volumes:
      - ./configuration/chirpstack-network-server:/etc/chirpstack-network-server
      - ./test:/test

I even tried moving the binary to the directory of the config and still the file is not found.

This is the test directory with some binaries

Update:
Checked the docker and the volume is mapped but the server does not see the plugins idk why
(On the left docker logs and on the right /bin/sh in docker )

Any ideas?

@brocaar any ideas? Still got the same problem
Even added user change in docker-compose.yml

services:
  chirpstack-network-server:
    image: chirpstack/chirpstack-network-server:3
    volumes:
      - ./configuration/chirpstack-network-server:/etc/chirpstack-network-server
      - ./test:/home/test
    depends_on:
      - postgresql
      - mosquitto
    user: 0:0

I believe you have configured /test/adr-plugin, but shouldn’t this be /home/test/adr-plugin, looking at your volumes config?

That’s new screenshot and changed config after many tries. These paths are the same. Tried to put the adr in different directories.