mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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 <dug@us.ibm.com>
This commit is contained in:
parent
beccf0f898
commit
9f79043a63
1 changed files with 5 additions and 0 deletions
|
@ -278,6 +278,11 @@ func workdir(b *Builder, args []string, attributes map[string]bool, original str
|
||||||
return err
|
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))
|
return b.commit("", b.runConfig.Cmd, fmt.Sprintf("WORKDIR %v", b.runConfig.WorkingDir))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue