Open kolod opened 5 months ago
Hello, sorry for getting back to you so late. I do not have much experience with WSL so I hope someone more qualified can step in eventually. Anyway, I don't really get what you mean with
if udev does not support containers and you mount /dev from the parent os or wsl?
and
If idev not working inside container why you install it?
It seems to me that udev works (on Linux, no idea on WSL, but as stated in the README I only guarantee support for Linux) and that is why I install it.
The only things that seems odd to me is that you set "privileged": false
in your devcontainer.json
. If you look at the code in this repository you can see that the container runs as privileged https://github.com/prenone/platformio-vscode-devcontainer/blob/f11ca7008793c26b54457225d8a2e4c60008bbb0/.devcontainer/devcontainer.json#L28C1-L30C4.
The code you use seems different from the current one in the repository, can you try to git clone this repo and upload a simple code to your device just to verify? Please reply with the errors you get and I will be more than happy to help you
It seems to me that udev works (on Linux, no idea on WSL, but as stated in the README I only guarantee support for Linux) and that is why I install it.
It works because you use /dev from host system.
I solved the problem as follows:
wsl --list --all
in PowerShell. If docker-desktop is set as default change it to Debian/Ubuntu by wsl --setdefault Debian
or wsl --setdefault Ubuntu
. If linux distro not installed install it from Microsoft Store.usbipd bind --hardware-id 1a86:55d3
in PowerShell console as Administrator.usbipd attach --wsl --auto-attach --hardware-id 1a86:55d3
in PowerShell console as normal user. WSL must be running.I am currently using my own container based on mcr.microsoft.com/vscode/devcontainers/base:bookworm
.
I see... I do not have the time to implement any change nor research it right now. But it seems like you have quite some experience, if you can put together a pull request I can try to test it in the next week and merge😁
if udev does not support containers and you mount
/dev
from the parent os or wsl?If idev not working inside container why you install it?
For my project I use two containers: one for firmware & one for UI.
docker-compose.yml
.devcontainer/firmware-container/devcontainer.json
.devcontainer/firmware-container/Dockerfile
PowerShell:
Debian WSL:
Inside container
Upload log