system-docker.go 355 B

1234567891011121314151617181920212223
  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.InitLogger()
  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.Main()
  17. }