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

Inject dockerinit at /.dockerinit instead of overwriting /sbin/init #898

Closed
wants to merge 1 commit into from

Conversation

@shykes
Copy link
Contributor

@shykes shykes commented Jun 14, 2013

This makes it possible to run /sbin/init inside a container.

We need to create an empty /.dockerinit in the container because the mountpoint must exist. But we don't want to cause side effects by leaving behind a .dockerinit. So we create a special aufs layer with just that empty file, and share it among all the containers. For internal purposes that layer is called the "docker init layer", and is stored inside the _tmp area, to get out of the way of regular layers (we don't want it showing up in 'docker images', etc).

…sbin/init. This makes it possible to run /sbin/init inside a container.
@shykes shykes mentioned this pull request Jun 15, 2013
@shykes
Copy link
Contributor Author

@shykes shykes commented Jun 17, 2013

@creack @vieux this one will need thorough testing.

@shykes
Copy link
Contributor Author

@shykes shykes commented Jun 18, 2013

@vieux
Copy link
Contributor

@vieux vieux commented Jun 18, 2013

Tests do not pass on my side

--- FAIL: TestKillDifferentUser (0.37 seconds)
    container_test.go:539: Container should be running
--- FAIL: TestUser (1.48 seconds)
    container_test.go:838: Container exit code is invalid: 127
        Output:

@vieux
Copy link
Contributor

@vieux vieux commented Jul 2, 2013

@shykes when rebasing master the first error is gone, only this one left:

--- FAIL: TestUser (1.48 seconds)
    container_test.go:838: Container exit code is invalid: 127
        Output:

When running docker-ut as daemon, can't locate any command.

@shykes
Copy link
Contributor Author

@shykes shykes commented Jul 2, 2013

Possibly because tests don't use the static binary?

@solomonstre
@getdocker

On Tue, Jul 2, 2013 at 8:44 AM, Victor Vieux notifications@github.com
wrote:

@shykes when rebasing master the first error is gone, only this one left:
--- FAIL: TestUser (1.48 seconds)
container_test.go:838: Container exit code is invalid: 127
Output:

When running docker-ut as daemon, can't locate any command.

Reply to this email directly or view it on GitHub:
#898 (comment)

@vieux
Copy link
Contributor

@vieux vieux commented Jul 2, 2013

Not sure, in you your branch, even docker run -u 1 docker-ut id fails

@vieux
Copy link
Contributor

@vieux vieux commented Jul 10, 2013

@shykes docker run -u 1 docker-ut id of docker run -u daemon docker-test-image id don't work. the tests pass on your side ?

@vieux
Copy link
Contributor

@vieux vieux commented Jul 30, 2013

Closed in favor of #1267

@vieux vieux closed this Jul 30, 2013
@creack creack deleted the clean-init-injection branch Aug 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants