builder/docker: comment the sleep on remote exec

This commit is contained in:
Mitchell Hashimoto 2013-11-09 00:06:45 -08:00
parent c1f0fe3f3f
commit eabd32f3ce
1 changed files with 7 additions and 0 deletions

View File

@ -41,7 +41,14 @@ func (c *Communicator) Start(remote *packer.RemoteCmd) error {
go func() {
defer stdin_w.Close()
// This sleep needs to be here because of the issue linked to below.
// Basically, without it, Docker will hang on reading stdin forever,
// and won't see what we write, for some reason.
//
// https://github.com/dotcloud/docker/issues/2628
time.Sleep(2 * time.Second)
stdin_w.Write([]byte(remote.Command + "\n"))
}()