# Device name with ":"

**URL:** <https://forums.docker.com/t/device-name-with/104473>\
**Category:** General\
**Tags:** docker\
**Created:** [February 15, 2021, 4:55pm UTC](https://forums.docker.com/t/device-name-with/104473 "2021-02-15T16:55:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [January 19, 2023, 9:01pm UTC](https://forums.docker.com/t/device-name-with/104473/4 "2023-01-19T21:01:18Z")

</div>

First of all the devices section is a list of device mappings, not a list of devices. The way you defined it would mean that

```auto
/dev/disk/by-id/usb-ST2000DL_003-9VT166_152D00539000-0

```

is the source device on the host and you want to attach it to the container two times. Once as “0” and once as “1”.

This is the same as you mount files or fodlers from the host.

Second, a mapping contains colons as separators, so you can’t have it in the values. As you probably now many files under `/dev/disk` are actually symbolic links and `/dev/` itself can contain symbolic links to disks. You can controll it with [udev](https://wiki.debian.org/udev). So you could create an other symlink under `/dev`.

In this case you can simply make two sombolic links in the compose project folder pointing to the two devices and use that symlink in the compose file. These symlinks would exist after reboot

```auto
ln -s "/dev/disk/by-id/usb-ST2000DL_003-9VT166_152D00539000-0:0" "$PWD/compose-usb-0"
ln -s "/dev/disk/by-id/usb-ST2000DL_003-9VT166_152D00539000-0:1" "$PWD/dev/compose-usb-1"

```

```auto
      devices:
        - "$PWD/compose-usb-0:/dev/compose-usb-0"
        - "$PWD/compose-usb-0:/dev/compose-usb-0"

```

Note that `$PWD` is required since it looks like the devices section doesn’t support relative path, but `$PWD` depends on where you run the compose command so you can replace that variable with your actual project path if you want.

---

_[View the full topic](https://forums.docker.com/t/device-name-with/104473)._
