Motioneye (installed inside Docker Compose) does not recognize external HD

Hi everyone, I’m a Docker newbie

I installed Motioneye (sw to record videos from surveillance cameras) in Docker Compose on Debian 12. I would like the video storage to be an ext4 USB disk which Debian sees as /media/usbdisk.
I log in as user, but I have RW permissions on the external disk and I am in the sudoers group.
In the Camera File Storage section on Motioneye I wrote as path /media/usbdisk, but Motioneye writes the videos to /var/lib/docker/overlay2/b97c14acacefff5556cbb6e4542b770f6255cb3d6755e4806a745e18c40da959/diff/media/usbdisk.

How do I tell Motioneye the right way, out Docker container? Thank you and sorry for my english.

You have to mount the usb disk to the host (as you did to /media/usbdisk) and from the host bind mount it inside the container. Then configure the app inside the container to save the videos there.

Note that bind mounting of external drives should work normally.

But it might not work when hot-plugging, so the drive should be connected permanently.