mirror of
https://github.com/rancher/os.git
synced 2025-06-02 11:56:09 +00:00
22 lines
315 B
Go
22 lines
315 B
Go
package systemdocker
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/docker/docker/docker"
|
|
"github.com/rancher/os/config"
|
|
)
|
|
|
|
func Main() {
|
|
if os.Geteuid() != 0 {
|
|
log.Fatalf("%s: Need to be root", os.Args[0])
|
|
}
|
|
|
|
if os.Getenv("DOCKER_HOST") == "" {
|
|
os.Setenv("DOCKER_HOST", config.SystemDockerHost)
|
|
}
|
|
|
|
docker.Main()
|
|
}
|