This is most likely because docker actually runs in a virtual machine on MacOS so you will need to map the serial port into the virtual machine first so it can then be mounted into the container.
The following gist may help: gist.github.com/stonehippo/e33750f185806924f1254349ea1a4e68
It explains how to map the serial port into the VM as a virtual USB serial port when using a version of Docker that uses VirtualBox.
If you are on a new M1 Mac then it may not be currently be possible:
Read more here: Source link