From 24ee1524815140b2299a1d98d4690d903a4abeb7 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 13 Feb 2013 17:40:10 -0800 Subject: [PATCH] Restored dockerd from merge --- dockerd/dockerd.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dockerd/dockerd.go diff --git a/dockerd/dockerd.go b/dockerd/dockerd.go new file mode 100644 index 0000000000..744964cf73 --- /dev/null +++ b/dockerd/dockerd.go @@ -0,0 +1,24 @@ +package main + +import ( + "log" + "flag" + "github.com/dotcloud/docker/server" + "github.com/dotcloud/docker" +) + +func main() { + if docker.SelfPath() == "/sbin/init" { + // Running in init mode + docker.SysInit() + return + } + flag.Parse() + d, err := server.New() + if err != nil { + log.Fatal(err) + } + if err := d.ListenAndServe(); err != nil { + log.Fatal(err) + } +}