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

22 lines
315 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") == "" {
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.Main()
2015-02-09 04:38:37 +00:00
}