1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00
Files
os/cmd/systemdocker/system-docker.go

24 lines
377 B
Go
Raw Normal View History

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