1
0
mirror of https://github.com/rancher/os.git synced 2025-05-19 13:29:45 +00:00
os/cmd/systemdocker/system-docker.go

24 lines
377 B
Go
Raw Normal View History

2015-02-17 21:31:20 +00:00
package systemdocker
2015-02-09 04:38:37 +00:00
import (
"os"
2016-06-01 04:38:10 +00:00
"github.com/docker/docker/docker"
"github.com/rancher/os/config"
"github.com/rancher/os/log"
2015-02-09 04:38:37 +00:00
)
2015-02-17 21:31:20 +00:00
func Main() {
log.SetLevel(log.DebugLevel)
if os.Geteuid() != 0 {
log.Fatalf("%s: Need to be root", os.Args[0])
}
2016-06-01 04:38:10 +00:00
if os.Getenv("DOCKER_HOST") == "" {
2016-11-28 08:06:00 +00:00
os.Setenv("DOCKER_HOST", config.SystemDockerHost)
2015-02-09 04:38:37 +00:00
}
2016-06-01 04:38:10 +00:00
docker.RancherOSMain()
2015-02-09 04:38:37 +00:00
}