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

22 lines
317 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 (
2016-06-01 04:38:10 +00:00
"log"
2015-02-09 04:38:37 +00:00
"os"
2016-06-01 04:38:10 +00:00
"github.com/docker/docker/docker"
"github.com/rancher/os/config"
2015-02-09 04:38:37 +00:00
)
2015-02-17 21:31:20 +00:00
func Main() {
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") == "" {
os.Setenv("DOCKER_HOST", config.DOCKER_SYSTEM_HOST)
2015-02-09 04:38:37 +00:00
}
2016-06-01 04:38:10 +00:00
docker.Main()
2015-02-09 04:38:37 +00:00
}