Skip to content

--device not work well when start container with --privileged option #35991

@wenlxie

Description

@wenlxie

Description

When I try to run container with command:
docker run -it --device=/dev/sdc4:/dev/xvdc --privileged ubuntu /bin/bash

There is supposed to have device /dev/xvdc inside the container, but I just saw device /dev/sdc4.

When I removed the --privileged option,I can find device /dev/xvdc exists.

Steps to reproduce the issue

Run container with --device and --privileged option

Describe the results you expected

When run container with option --device and --privileged option, can see the specified device inside the container

Docker version
1.12.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeRuntimekind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.kind/enhancementEnhancements are not bugs or new features but can improve usability or performance.status/claimedstatus/confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions