Open Nemo157 opened 6 years ago
Yes, the --device
(like --volume
) option uses colons as a separator between options, and uses the --device <device on host>:<path-in-container>[:<options>]
format
To resolve this, we'd probably need an additional syntax, similar to what's used for the --mount
option (or would it make sense to add a type=device
option to --mount
? @cpuguy83 ?).
--mount
would be a good fit for this.
Changed the title to reflect the proposed change to facilitate this 👍
seems like this is fixed as well. shouldn't this be closed?
I don't think type=device
has been implemented in the API; https://github.com/moby/moby/blob/8bb58153e75b4310f3ae9ec6d03924aa286fbf20/api/types/mount/mount.go#L7
// Type represents the type of a mount.
type Type string
// Type constants
const (
// TypeBind is the type for mounting host dir
TypeBind Type = "bind"
// TypeVolume is the type for remote storage volumes
TypeVolume Type = "volume"
// TypeTmpfs is the type for mounting tmpfs
TypeTmpfs Type = "tmpfs"
// TypeNamedPipe is the type for mounting Windows named pipes
TypeNamedPipe Type = "npipe"
// TypeCluster is the type for Swarm Cluster Volumes.
TypeCluster Type = "cluster"
)
Description
Cannot pass a
:
character as part of a device name when starting a container.Steps to reproduce the issue:
:
characterDescribe the results you received:
Describe the results you expected:
Some way to escape the
:
character to successfully mount this device.Output of
docker version
: