Просмотр исходного кода

Merge pull request #27874 from duglin/addComment

Add a comment about how we don't mkdir during WORKDIR directly
Sebastiaan van Stijn 8 лет назад
Родитель
Сommit
507b4e9e4a
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      builder/dockerfile/dispatchers.go

+ 5 - 0
builder/dockerfile/dispatchers.go

@@ -278,6 +278,11 @@ func workdir(b *Builder, args []string, attributes map[string]bool, original str
 		return err
 	}
 
+	// NOTE: You won't find the "mkdir" for the directory in here. Rather we
+	// just set the value in the image's runConfig.WorkingDir property
+	// and container.SetupWorkingDirectory() will create it automatically
+	// for us the next time the image is used to create a container.
+
 	return b.commit("", b.runConfig.Cmd, fmt.Sprintf("WORKDIR %v", b.runConfig.WorkingDir))
 }