-
Notifications
You must be signed in to change notification settings - Fork 192
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
Allow to run through docker #466
Conversation
For testing this before merging: $ docker build --tag nut https://github.com/felipecrs/nut.git
$ docker run --rm -it --network=host --env=DISPLAY --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume="$PWD:$PWD" --workdir="$PWD" --user=$(id -u):$(id -g) nut |
@andrea-ap, replying to your comment here: I just tried the two commands above and it worked just fine. Here is a quick demo: WindowsTerminal_pM5gcOy0wI.mp4Since you mentioned you are running with Docker Desktop, my recommendation is that you run this command through WSL2 and not through PowerShell/CMD for example. |
Hi, thank you for your quick reply. I have downloaded the code from the repository, I have already inserted the titledb folder, and inserted the key. I use winn1 and i installed ubuntu as subsystem of win11.I created image with: docker build -t nut . , and then I ran the command line: docker run --rm -it --network=host --env=DISPLAY --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume= "$PWD:$PWD" --workdir="$PWD" --user=$(id -u):$(id -g) nut , the problem is that I don't reach my pc locally, using ip which tells me the nut server, but how can I proceed, do I have to change ip in the ubuntu instance as a win11 subnet, or do I have to create network in ducker?And not see connect usb? Thank you. nut-video.1.mp4 |
Oh... I got your problem now. And I honestly don't know how you can overcome it. |
i solve with: sudo docker run --rm -it --network host --env=DISPLAY --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume="$PWD:$PWD" --workdir="$PWD" --user=$(id -u):$(id -g) nut-server-mod:latest |
What did you change exactly? Added sudo and removed the user? |
i wasn't reachable from outside, i changed --network=host to --network host , so i fixed it |
The Note that the host network driver only works on Linux hosts and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server. The |
That's funny. |
This looks nice, installation is actually a bit of a hassle, why isn't it merged? |
merged |
No description provided.