# Docker problem with /dev/ttyUSB serial paths

**URL:** <https://forums.docker.com/t/docker-problem-with-dev-ttyusb-serial-paths/23966>\
**Category:** General\
**Tags:** docker, raspberrypi\
**Created:** [October 26, 2016, 8:57pm UTC](https://forums.docker.com/t/docker-problem-with-dev-ttyusb-serial-paths/23966 "2016-10-26T20:57:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsamir](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/fsamir/32/13233_2.png) [@fsamir](https://forums.docker.com/u/fsamir)\
**Post date:** [October 26, 2016, 8:57pm UTC](https://forums.docker.com/t/docker-problem-with-dev-ttyusb-serial-paths/23966/1 "2016-10-26T20:57:37Z")

</div>

Hi there,

my docker container is not dealing well with the way Linux mount serial paths under /dev/ttyUSBX,  
**Problems:**

- USB device under /dev/ttyUSB0 have to be connected before docker starts, otherwise they wont exist.
- Unplugging a device that was detect and properly mapped, does’t un-map the device, hence most serial-port libraries cannot determine it was disconnected and crashes.

Other things to notice:

- lsusb finds the devices with no problems at all, regardless if they were connected before or after booting.
- dmesg also detects the devices.

**Relevant part of docker-compose**  
Noticed I am mapping the devices and also running as proviliged.  
devices:  
- “/dev/mem:/dev/mem”  
- /dev/bus/usb:/dev/bus/usb:rwm  
- /dev/ttyUSB0:/dev/ttyUSB0:rwm  
- /dev/ttyUSB1:/dev/ttyUSB1:rwm  
privileged: true  
tty: true  
volumes:  
- /dev/bus/usb:/dev/bus/usb

**My environment:**

- Docker 1.11 running on a RPI 3 (FROM resin/raspberrypi3-node:4.3)
- USB Serial device: Arduino nano, but it happens with any USB peripheral.

$ docker-compose -v  
docker-compose version 1.8.0, build 94f7016

$ docker -v  
Docker version 1.11.1, build 5604cbe

$ uname -a  
Linux dev-reefmate 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux
