Преглед изворни кода

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 пре 7 година
родитељ
комит
3cf480177f
1 измењених фајлова са 5 додато и 1 уклоњено
  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