mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
24 lines
312 B
Go
24 lines
312 B
Go
package main
|
|
|
|
import (
|
|
".."
|
|
"../server"
|
|
"flag"
|
|
"log"
|
|
)
|
|
|
|
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)
|
|
}
|
|
}
|