Skip to content

Could not mount /dev with --init flag #37645

@cofyc

Description

@cofyc

Description

If a program need to mount /dev into container (e.g. used to discovery devices), it cannot work with dockerd --init flag.

Steps to reproduce the issue:

  1. Enable --init flag
  2. Run a container with -v /dev:/dev

Describe the results you received:

starting container process caused "exec: \"/dev/init\": stat /dev/init: no such file or directory": unknown

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:17:20 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:15:30 2018
  OS/Arch:      linux/amd64
  Experimental: false

Output of docker info:

Containers: 34
 Running: 7
 Paused: 0
 Stopped: 27
Images: 261
Server Version: 18.03.1-ce
Storage Driver: aufs
 Root Dir: /data/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 425
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-116-generic
Operating System: Ubuntu 16.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 7.779GiB
Name: dev
ID: X75A:VH7C:4CHW:ZAP7:RFJP:XQ3J:FBTE:FJUD:OGOH:WOYG:37SI:YAWX
Docker Root Dir: /data/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: cofyc
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: true

WARNING: No swap limit suppor

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions