Merge branch 'tianon-separate-dockerinit' into dm

Conflicts:
	runtime_test.go
This commit is contained in:
Guillaume J. Charmes
2013-10-18 15:49:03 -07:00
5 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -1096,7 +1096,7 @@ func (container *Container) releaseNetwork() {
container.NetworkSettings = &NetworkSettings{}
}
// FIXME: replace this with a control socket within docker-init
// FIXME: replace this with a control socket within dockerinit
func (container *Container) waitLxc() error {
for {
output, err := exec.Command("lxc-info", "-n", container.ID).CombinedOutput()
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"github.com/dotcloud/docker/sysinit"
)
var (
GITCOMMIT string
VERSION string
)
func main() {
// Running in init mode
sysinit.SysInit()
return
}
+1 -1
View File
@@ -92,7 +92,7 @@ lxc.mount.entry = devpts {{$ROOTFS}}/dev/pts devpts newinstance,ptmxmode=0666,no
#lxc.mount.entry = varlock {{$ROOTFS}}/var/lock tmpfs size=1024k,nosuid,nodev,noexec 0 0
lxc.mount.entry = shm {{$ROOTFS}}/dev/shm tmpfs size=65536k,nosuid,nodev,noexec 0 0
# Inject docker-init
# Inject dockerinit
lxc.mount.entry = {{.SysInitPath}} {{$ROOTFS}}/.dockerinit none bind,ro 0 0
# In order to get a working DNS environment, mount bind (ro) the host's /etc/resolv.conf into the container
+2 -2
View File
@@ -56,10 +56,10 @@ func init() {
} else {
selfPath := utils.SelfPath()
// If we have a separate docker-init, use that, otherwise use the
// If we have a separate dockerinit, use that, otherwise use the
// main docker binary
dir := filepath.Dir(selfPath)
dockerInitPath := filepath.Join(dir, "docker-init")
dockerInitPath := filepath.Join(dir, "dockerinit")
if _, err := os.Stat(dockerInitPath); err != nil {
sysInitPath = selfPath
} else {
+1 -1
View File
@@ -95,7 +95,7 @@ func executeProgram(name string, args []string) {
// up the environment before running the actual process
func SysInit() {
if len(os.Args) <= 1 {
fmt.Println("You should not invoke docker-init manually")
fmt.Println("You should not invoke dockerinit manually")
os.Exit(1)
}
var u = flag.String("u", "", "username or uid")