Преглед на файлове

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