1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/dockerd/dockerd.go

25 lines
360 B
Go
Raw Normal View History

2013-02-13 20:40:10 -05:00
package main
import (
"flag"
"github.com/dotcloud/docker"
2013-02-13 20:40:57 -05:00
"github.com/dotcloud/docker/server"
"log"
2013-02-13 20:40:10 -05:00
)
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)
}
}