It seems that the combination of udev and network_mode: host causes cellular modems to be replugged after a container restart, which often will result in the modem never reconnecting.
The recommendation for modem based applications is to use a microservices application type and add a docker-compose.yml that looks as follows:
It seems that the combination of udev and
network_mode: host
causes cellular modems to be replugged after a container restart, which often will result in the modem never reconnecting.The recommendation for modem based applications is to use a
microservices
application type and add adocker-compose.yml
that looks as follows:the reason has to do with https://github.com/systemd/systemd/issues/6713 and the way udev in the container handles network namespaces.