|
...
|
...
|
@@ -228,7 +228,12 @@ func (e *ClientExecutor) Build(r io.Reader, args map[string]string) error {
|
|
228
|
228
|
)
|
|
229
|
229
|
}
|
|
230
|
230
|
|
|
231
|
|
- if err := e.Client.StartContainer(e.Container.ID, &hostConfig); err != nil {
|
|
|
231
|
+ hc := &hostConfig
|
|
|
232
|
+ if len(hostConfig.Binds) == 0 {
|
|
|
233
|
+ // don't set HostConfig if we have no need for binds
|
|
|
234
|
+ hc = nil
|
|
|
235
|
+ }
|
|
|
236
|
+ if err := e.Client.StartContainer(e.Container.ID, hc); err != nil {
|
|
232
|
237
|
return fmt.Errorf("unable to start build container: %v", err)
|
|
233
|
238
|
}
|
|
234
|
239
|
// TODO: is this racy? may have to loop wait in the actual run step
|