Przeglądaj źródła

Use the dockerenv file from the current dir instead of root

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Guillaume J. Charmes 11 lat temu
rodzic
commit
e84e344b1f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      sysinit/sysinit.go

+ 1 - 1
sysinit/sysinit.go

@@ -66,7 +66,7 @@ func SysInit() {
 
 	// Get env
 	var env []string
-	content, err := ioutil.ReadFile("/.dockerenv")
+	content, err := ioutil.ReadFile(".dockerenv")
 	if err != nil {
 		log.Fatalf("Unable to load environment variables: %v", err)
 	}