瀏覽代碼

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