deconz-community / deconz-docker

MIT License
382 stars 35 forks source link

Building zshark images? #155

Closed deviantintegral closed 1 year ago

deviantintegral commented 1 year ago

I wanted to use zshark to sniff my zigbee network. I was surprised there wasn't already a Docker container for it! Since it's also a GUI app, it needs many of the same features (xorg, VNC, etc) as deconz. Would there be interest in publishing zshark images? I suppose it could also be the same image with an environment variable or entrypoint override, but I think it's reasonable that most Docker users would expect a different image name.

My current Dockerfile:

FROM deconzcommunity/deconz:stable

ADD https://phoscon.de/downloads/zshark/ubuntu/zshark-1.00.06-amd64-bionic.deb /
COPY start.sh /start.sh
RUN apt-get update && \
    dpkg -i ./zshark-1.00.06-amd64-bionic.deb || true && \
    apt-get -fy install

ENTRYPOINT ["/start.sh"]

start.sh is copied from the current images, overriding the exec command at the end to exec gosu deconz /usr/bin/zshark.

I would have liked to have environment variables to make it totally headless, but zshark is hanging if I pass it CLI args. As well, it was unable to update the firmware automatically, and I had to manually switch the firmware with GCFlasher.

phdelodder commented 1 year ago

The manual firmware is also the case of deconz.

I could be tempted to make that as well. I'll see if I first can get a repository up.

Mimiix commented 1 year ago

Created a https://github.com/deconz-community/zshark-docker :)

deviantintegral commented 1 year ago

Wonderful! Thank you.

phdelodder commented 1 year ago

@deviantintegral Please create any ticket for an issue