docker / docker/cli

Enhancement: implement --mount type=device

Open
#742 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

exp/expert exp/intermediate kind/enhancement
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

Cannot pass a : character as part of a device name when starting a container.

Steps to reproduce the issue:

  1. Have a device node containing a : character
  2. Attempt to run a docker container with this device mounted into it.

Describe the results you received:

> sudo ln -s random /dev/example:device
> docker run --device /dev/example:device alpine sh -c 'head -c 5 /dev/example:device | base64'
invalid argument "/dev/example:device" for --device: device is not an absolute path

Describe the results you expected:

Some way to escape the : character to successfully mount this device.

Output of docker version:

Docker version 17.10.0-ce, build f4ffd2511c

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Docker CLI entry points for --device and the proposed --mount type=device syntax. Reproduce the failure with the shown docker run --device command and determine how a device name containing : should be represented. Done means the device can be mounted successfully without the current absolute-path parsing error, with behavior verified against the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.