Parcourir la source

pick config or container_config, not both

ok, so container_config must be deprecated or something, 'cause the test
image has both set. that explains that.
Alex Suraci il y a 7 ans
Parent
commit
3cf480177f
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      cmd/in/main.go

+ 5 - 1
cmd/in/main.go

@@ -130,7 +130,11 @@ func rootfsFormat(dest string, req InRequest, image v1.Image) {
 		return
 	}
 
-	env := append(cfg.Config.Env, cfg.ContainerConfig.Env...)
+	env := cfg.Config.Env
+	if len(env) == 0 {
+		env = cfg.ContainerConfig.Env
+	}
+
 	user := cfg.Config.User
 	if user == "" {
 		user = cfg.ContainerConfig.User