system-docker.go 377 B

123456789101112131415161718192021222324
  1. package systemdocker
  2. import (
  3. "os"
  4. "github.com/docker/docker/docker"
  5. "github.com/rancher/os/config"
  6. "github.com/rancher/os/log"
  7. )
  8. func Main() {
  9. log.SetLevel(log.DebugLevel)
  10. if os.Geteuid() != 0 {
  11. log.Fatalf("%s: Need to be root", os.Args[0])
  12. }
  13. if os.Getenv("DOCKER_HOST") == "" {
  14. os.Setenv("DOCKER_HOST", config.SystemDockerHost)
  15. }
  16. docker.RancherOSMain()
  17. }