From 9f79043a63302258a597a69b0c5ec5e09a480ac0 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Fri, 28 Oct 2016 19:24:37 -0700 Subject: [PATCH] Add a comment about how we don't mkdir during WORKDIR directly Just to help the next time someone goes looking for it while debugging. Like @jhowardmsft and I did while looking at #27545. Signed-off-by: Doug Davis --- builder/dockerfile/dispatchers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/dockerfile/dispatchers.go b/builder/dockerfile/dispatchers.go index 06dc622682..eaff0c1cc3 100644 --- a/builder/dockerfile/dispatchers.go +++ b/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)) }