Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to turn on init process in docker-for-mac #1336

Closed
micahhausler opened this issue Feb 24, 2017 · 3 comments
Closed

Unable to turn on init process in docker-for-mac #1336

micahhausler opened this issue Feb 24, 2017 · 3 comments

Comments

@micahhausler
Copy link

Expected behavior

Adding the following docker configuration should add --init to the dockerd daemon and mount tini to /dev/init.

{
  "init" : true
}

Actual behavior

No --init flag on the dockerd daemon, no /dev/init mounted into containers

Information

I'm running docker 1.13.1 on macOS 10.12.3, a fresh install of docker for mac

Steps to reproduce the behavior

  1. Start docker for mac
  2. Run docker run -it --rm alpine ls /dev, and there is no init entry
  3. Run docker run -it --rm --pid host -e COLUMNS=200 alpine /bin/sh -c "ps aux | grep dockerd", and there is no --init flag added

Configured as indicated by moby/moby#26941 moby/moby#26061, and moby/moby#28037

@rogaha
Copy link

rogaha commented Feb 27, 2017

@micahhausler I tried it using the same setup as yours and it's working for me (see the steps to validate below). Can you please try to restart Docker for Mac just to make sure the change is applied?

rogaha@MacBook-Pro:~/development/rogaha$ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
Welcome to Moby

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/


/ # cat /etc/docker/daemon.json
{"init":true}/ #
/ #

rogaha@MacBook-Pro:~/development/rogaha$ docker run -it --rm alpine ls /dev                                                                   2:24:38  ☁  master ☂ ✭
console  full     null     random   stdin    urandom
core     init     ptmx     shm      stdout   zero
fd       mqueue   pts      stderr   tty
rogaha@MacBook-Pro:~/development/rogaha$ docker version                                                                                       3:06:18  ☁  master ☂ ✭
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      linux/amd64
 Experimental: true
rogaha@MacBook-Pro:~/development/rogaha$

As follow up related to this issue, I've raised this ticket: moby/moby#31381. It should help us to verify if the --init is enabled or not.

@micahhausler
Copy link
Author

I don't know why, but after a rebooting again (I had to initially when I added the setting), it works.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants