Unable to start with Sonoff ZBDongle-E in HA container with Docker

Currently, I am stuck in the initial configuration/setup of Home Assistant Container in Docker with a Sonoff ZBDongle-E Dongle.

It seems that mapping the dongle to the container is causing the issue. I am running HA in Docker because I want to use it on a Linux server that I also use for other purposes.
Summary of Hardware and Software Situation


PC: Ryzen 3 with the latest stable Ubuntu
USB Device: Sonoff ZBDongle-E
    Firmware: Original at the moment (but also tried flashed with MultiPAN RCP (Zigbee + Thread for Silabs Multiprotocol Addon) (https://dialedin.com.au/blog/sonoff-zbdongle-e-rcp-firmware)


Docker: Docker Desktop
Container Management: Portainer
Home Assistant: Running in a Docker container
    Version: homeassistant/home-assistant, latest stable

Problem Description

I am trying to start Home Assistant in a Docker container but keep getting the following error message:

Cannot start Docker Compose application. Reason: compose [start] exit status 1. Container homeassistant Starting Error response from daemon: error gathering device information while adding custom device “/dev/ttyACM0”: no such file or directory

Steps I Have Already Taken

Verification of the device /dev/ttyACM0:

The device is recognized as /dev/ttyACM0.
The permissions of the device seem to be correct.

Docker Compose Configuration:
My docker-compose.yml file is configured as follows:

version: ‘3’
container_name: homeassistant
image: “homeassistant/home-assistant:stable”
- /home/blah/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- TZ=Europe/Amsterdam
restart: unless-stopped
network_mode: host
- “/dev/ttyACM0:/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218162855-if00”


What could be the cause of the error message "error gathering device information while adding custom device /dev/ttyACM0"?
Are there specific configurations or settings in Docker Desktop that I might be overlooking?
How can I ensure that the Docker container correctly accesses the device /dev/ttyACM0?
Are there additional diagnostic steps I can take to resolve this issue?

Is it not the other way around ?

- "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218162855-if00:/dev/ttyACM0"

thank you for your quick reply.

I tried both actually, this was the latest in my config after trying everything multiple times.

I changed it now to your suggestion and get the error:

ERROR: for homeassistant Cannot start service homeassistant: error gathering device information while adding custom device “/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218162855-if00”: no such file or directory

I see already, docker desktop does not do USB pass-through. Use docker-ce instead.

According official Docker Desktop FAQs, it is not possible to pass through a USB device:

Can I pass through a USB device to a container?

Unfortunately, it is not possible to pass through a USB device (or a serial port) to a container as it requires support at the hypervisor level.