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

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