# Using "virtual" serial usb device in docker container

**URL:** <https://forums.docker.com/t/using-virtual-serial-usb-device-in-docker-container/51439>\
**Category:** General\
**Created:** [May 25, 2018, 6:58pm UTC](https://forums.docker.com/t/using-virtual-serial-usb-device-in-docker-container/51439 "2018-05-25T18:58:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayken](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jayken](https://forums.docker.com/u/jayken)\
**Post date:** [May 25, 2018, 6:58pm UTC](https://forums.docker.com/t/using-virtual-serial-usb-device-in-docker-container/51439/1 "2018-05-25T18:58:58Z")

</div>

Issue type: help request  
OS: Arch Linux  
Server version: 18.05.0-ce

Hi,  
I am trying to use a “virtual” serial USB device inside of a docker image that I use and have not myself created.  
Virtual means, that the device is plugged into another computer on the local net and shared via ethernet. I use socat on the computer where I run docker to create a virtual ttyUSB0 device unter /dev/ttyUSB0.

The output of ls -lah /dev/tty\* is:

`lrwxrwxrwx 1 root root 10 May 23 12:33 /dev/ttyUSB0 -> /dev/pts/6`

This device works fine on the host. When using the docker run command with the --device flag to pass the device into the container, it shows up inside the container, but the software running in the container can’t communicate with it.  
I am guessing this is, because the link that the /dev/ttyUSB0 device points to, doesn’t exist. However, using /dev/pts/6 as the device name for the --device flag doesn’t work either.

Is there a way to use this virtual device inside a docker container without having to create my own image and running socat inside the container?

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![clempat](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/clempat/32/10629_2.png) [@clempat](https://forums.docker.com/u/clempat)\
**Post date:** [June 23, 2018, 6:38pm UTC](https://forums.docker.com/t/using-virtual-serial-usb-device-in-docker-container/51439/2 "2018-06-23T18:38:40Z")

</div>

Hi,

I am interested as well. Did you find a solution ?

Thanks
