The plugin doesn't allow me to run a service via docker-compose but has no problem running the same configuration via docker. invoking docker-compose gives me the error in the title, the plugin prints "Recovered panic: runtime error: invalid memory address or nil pointer dereference" among other messages.
# docker run -d --privileged -P -w /etc/docker -v /etc/docker/dind:/etc/docker -v /run/docker/plugins/hbm.sock:/run/docker/plugins/hbm.sock docker:dind --data-root /var/lib/docker-packaged --storage-driver=aufs --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem --authorization-plugin=hbm
bdcc971a1f3ea5d2dd1c67c26fbd8f513cdb805e0f579aa38b7ebe7368354b06
$ docker-compose --tlsverify --tlscacert ~/.docker/ca.pem --tlscert ~/.docker/cert.pem --tlskey ~/.docker/key.pem -H 127.0.0.1:32768 run init
ERROR: Cannot create container for service init: plugin hbm failed with error: AuthZPlugin.AuthZReq: an error occurred; contact your system administrat
$ docker run --rm --init --net none -ti bash -c 'echo "Container with init started, try and press Ctrl+C to stop, timeout: 10s" ; sleep 10'
Container with init started, try and press Ctrl+C to stop, timeout: 10s
^C
time="2018-08-22T03:40:20+02:00" level=info action=network_inspect admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=network_inspect admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=image_inspect admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=container_list admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=container_list admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=container_list admin=false allowed=true authorization=true user=client
time="2018-08-22T03:40:20+02:00" level=info action=container_list admin=false allowed=true authorization=true user=client
2018/08/22 03:40:20 Recovered: runtime error: invalid memory address or nil pointer dereference
time="2018-08-22T03:40:20+02:00" level=warning msg="Recovered panic: runtime error: invalid memory address or nil pointer dereference"
time="2018-08-22T03:40:20+02:00" level=warning msg="goroutine 5399 [running]:\nruntime/debug.Stack(0xc42083eb20, 0xc420a9fbe0, 0x2)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x79\ngithub.com/kassisol/hbm/plugin.(*Api).Allow.func1(0xf74640, 0xc42083eb20, 0xf70560, 0xc4206a1840, 0xc420a37950)\n\t/go/src/github.com/kassisol/hbm/plugin/api.go:56 +0x137\npanic(0xa314e0, 0xf5a0c0)\n\t/usr/local/go/src/runtime/panic.go:489 +0x2cf\ngithub.com/kassisol/hbm/plugin.(*Api).Allow(0xc42083eb00, 0xc420263890, 0x6, 0xc420263896, 0x3, 0xc42026389c, 0x4, 0xc420a28870, 0x2d, 0xc42009c000, ...)\n\t/go/src/github.com/kassisol/hbm/plugin/api.go:112 +0x7e4\ngithub.com/kassisol/hbm/plugin.(*plugin).AuthZReq(0xc420384d80, 0xc420263890, 0x6, 0xc420263896, 0x3, 0xc42026389c, 0x4, 0xc420a28870, 0x2d, 0xc42009c000, ...)\n\t/go/src/github.com/kassisol/hbm/plugin/plugin.go:52 +0x238\ngithub.com/kassisol/hbm/vendor/github.com/docker/go-plugins-helpers/authorization.(*Handler).initMux.func1(0xc420263890, 0x6, 0xc420263896, 0x3, 0xc42026389c, 0x4, 0xc420a28870, 0x2d, 0xc42009c000, 0x2ab, ...)\n\t/go/src/github.com/kassisol/hbm/vendor/github.com/docker/go-plugins-helpers/authorization/api.go:118 +0xa0\ngithub.com/kassisol/hbm/vendor/github.com/docker/go-plugins-helpers/authorization.(*Handler).handle.func1(0xf6f9e0, 0xc4206d62a0, 0xc420270200)\n\t/go/src/github.com/kassisol/hbm/vendor/github.com/docker/go-plugins-helpers/authorization/api.go:139 +0x14c\nnet/http.HandlerFunc.ServeHTTP(0xc42039ae40, 0xf6f9e0, 0xc4206d62a0, 0xc420270200)\n\t/usr/local/go/src/net/http/server.go:1942 +0x44\nnet/http.(*ServeMux).ServeHTTP(0xc420384e70, 0xf6f9e0, 0xc4206d62a0, 0xc420270200)\n\t/usr/local/go/src/net/http/server.go:2238 +0x130\nnet/http.serverHandler.ServeHTTP(0xc420010dc0, 0xf6f9e0, 0xc4206d62a0, 0xc420270200)\n\t/usr/local/go/src/net/http/server.go:2568 +0x92\nnet/http.(*conn).serve(0xc420701220, 0xf702a0, 0xc4207e16c0)\n\t/usr/local/go/src/net/http/server.go:1825 +0x612\ncreated by net/http.(*Server).Serve\n\t/usr/local/go/src/net/http/server.go:2668 +0x2ce\n"
$ uname -a
Linux Celmor-PC 4.17.9-1-MANJARO #1 SMP PREEMPT Sun Jul 22 20:01:56 UTC 2018 x86_64 GNU/Linux
$ cat docker-compose.yml
version: '3.7'
services
init:
image: bash
init: true
stdin_open: true
tty: true
network_mode: "none"
command:
- -c
- echo
- "Container with init started, try and press Ctrl+C to stop, timeout: 10s"
- sleep 10