system-docker.go 317 B

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