-
-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a container available for easy deployment #69
Comments
I'm already considering to make a container and I plan to publish it in the near future! |
I started drafting a Dockerfile and I encountered some problems.
After the run error which specify the missing dependency, I added it and re-built. But when I run again, another missing dependency is pointed out. How can I know a priori all the required dependency of this process? It took about 20 minutes to compile the container and I cannot wait this time every time just to find out the next missing dependency. |
Update: after having included other apparently needed dependencies (
I've already tried to set |
I find some related issues, @GyulyVGC this may be helpful for you. |
I was thinking. https://askubuntu.com/questions/40011/how-to-let-dpkg-i-install-dependencies-for-me Sorry, I don't have much experience with docker, if my solution doesn't make any sense I apologise in advance. |
This is an interesting point and I could try it out. |
I made it work for me on debian bullseye with attached dockerfile (bcs of #138) My system is setup with amd renoir GPU, configured so its working with "radeontop". Forwarding the required devices files and xauthority stuff for X11 forwarding via docker command. Alternatively you might want to use docker --gpu all option, if that works out for you. Build: sudo docker build . -t sniffnet Run:
alternative w/o --privileged
If GPU is not working correctly, you might receive: WARNING: lavapipe is not a conformant vulkan implementation, testing use only and application malfunctions (quits after first attempt to use mouse) PS (#138) I dont know how the released .deb package was built (using cargo helpers?) However, the resulting binary linking against the wrong openssl version suggests the debian package was built on a different system than debian bullseyes and additionally, its missing all the required dependencies in debian/control file, which are usually auto generated by the debian packaging scripts. You might want to change the way you build the debian package at all, becasue the build process seems quite broken. |
I'm changing the way packages are created and I need some feedbacks. Now dependencies are included in the control file and also the openssl version problem should be fixed. @abbbi could you confirm that this DEB package works fine for you? |
tested in latest bulleye container: root@cefix-bullseye-amd64-moa3:/srv# unzip sniff.zip
|
Weird. The package has been created with cargo-deb this time (with auto generated dependencies). Edit: I've also tried by manually specifying run deps but it still gives me an error related to |
Hi guys. I have started attempting this issue again. You can find my draft PR here: https://github.com/GyulyVGC/sniffnet/pull/455/files Let me know if I have understood this right. We want a Docker image that can allow users to run the app automatically right? Could you help me out with this error? [+] Building 3.2s (6/6) FINISHED docker:desktop-linux
=> [build-image internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 142B 0.0s
=> [build-image internal] load metadata for docker.io/homebrew/ubuntu22.04:latest 3.0s
=> [build-image internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [build-image 1/3] FROM docker.io/homebrew/ubuntu22.04:latest@sha256:5575416635b5e552cd8faa54cdfe708f9169200246cd10118c450cbf545a6075 0.0s
=> CACHED [build-image 2/3] RUN brew install sniffnet 0.0s
=> ERROR [build-image 3/3] RUN ["sniffnet"] 0.2s
------
> [build-image 3/3] RUN ["sniffnet"]:
0.153 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PcapError("tunl0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Inappropriate ioctl for device")', src/configs/types/config_device.rs:19:43
0.154 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------
failed to solve: process "sniffnet" did not complete successfully: exit code: 1 |
Thank you!
Yes, this would allow to easily run Sniffnet on any kind of system without worrying about dependencies and the running environment in general
This is due an error in the opening of the default network device. If you got this error I suppose you are using v1.2.2. |
I am studying how Docker deals with networks. I'll get back with some solutions and insights |
I am considering running the app in a detached state and then doing SSH X11 forwarding to interact with it. Some progress... I am building with FROM rust:bullseye as builder
RUN apt-get upgrade -y && apt-get update
RUN apt-get install -y libpcap-dev libasound2-dev libfontconfig1-dev libgtk-3-dev
RUN apt-get install -y xorg openbox
RUN cargo install sniffnet
RUN apt-get install libx11-dev
RUN addgroup --system sniffnet
RUN adduser --system sniffnet --ingroup sniffnet
RUN ulimit -n 100000
USER sniffnet
CMD ["sniffnet"] I get the following error: ➜ sniffnet git:(feat-docker-container-deployment) ✗ docker compose run sniffnet
/---------------------------------------------------------\
| _____ _ __ __ _ |
| / ____| (_) / _| / _| | | |
| | (___ _ __ _ | |_ | |_ _ __ ___ | |_ |
| \___ \ | '_ \ | | | _| | _| | '_ \ / _ \ | __| |
| ____) | | | | | | | | | | | | | | | | __/ | |_ |
| |_____/ |_| |_| |_| |_| |_| |_| |_| \___| \__| |
| |
| ___________ |
| /___________\ |
| | ___________ | |
| | | | | |
| | | v1.2.2 | | |
| | |_________| |________________________ |
| \_____________/ by Giuliano Bellini ) |
| / ''''''''''' \ / |
| / ::::::::::::: \ =D-' |
| (_________________) |
\_________________________________________________________/
thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:757:9:
Failed to initialize any backend! Wayland status: XdgRuntimeDirNotSet X11 status: XOpenDisplayFailed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
% |
This error is due to the |
Okay I see. I'll look for some references of projects that reliably run Iced inside Docker. As an alternative, a web interface like Pi-Hole could be useful |
A container makes it easy to test and run software. Containers are common practice among self hosters, and this software looks like it would be of interest to them, I think this is a valuable addition.
Maybe take some inspiration from https://github.com/RustScan/RustScan (its also about networks, and built with rust).
The text was updated successfully, but these errors were encountered: