1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Reset stdin config before running build actions

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2017-02-15 11:49:17 -08:00
parent abe6a073c7
commit 0f293f9eb3

View file

@ -419,6 +419,10 @@ func (b *Builder) processImageFrom(img builder.Image) error {
onBuildTriggers := b.runConfig.OnBuild
b.runConfig.OnBuild = []string{}
// Reset stdin settings as all build actions run without stdin
b.runConfig.OpenStdin = false
b.runConfig.StdinOnce = false
// parse the ONBUILD triggers by invoking the parser
for _, step := range onBuildTriggers {
ast, err := parser.Parse(strings.NewReader(step), &b.directive)