@@ -102,8 +102,8 @@ func main() {
102
102
status , cleanup , err := dockerRun (cfg , hostcfg , sess , * cmd , * exportFolder )
103
103
defer cleanup ()
104
104
if err != nil {
105
- fmt . Fprintln ( sess , err )
106
- ErrorPrint (err .Error ())
105
+ sess . Write ([] byte ( "Error executing container: [" + err . Error () + "] \n " ) )
106
+ ErrorPrint ("Failed to execute: %s" , err .Error ())
107
107
}
108
108
sess .Exit (int (status ))
109
109
})
@@ -233,14 +233,14 @@ func dockerRun(
233
233
startErr := docker .ContainerStart (ctx , resp .ID , container.StartOptions {})
234
234
if startErr != nil {
235
235
ErrorPrint ("Unable to start container: %s" , startErr )
236
- sess .Write ([]byte ("Unable to pull requested image" + string (startErr .Error ()) + "\n " ))
236
+ sess .Write ([]byte ("Unable to start requested image: [ " + string (startErr .Error ()) + "] \n " ))
237
237
return
238
238
}
239
239
InfoPrint ("Wait for container %s to be ready" , resp .ID )
240
240
err = waitForContainerReady (ctx , sess , docker , resp .ID , 30 * time .Second )
241
241
if err != nil {
242
- sess .Write ([]byte ("container failed to become ready" ))
243
- log .Print ("Container failed to become ready:" , err )
242
+ sess .Write ([]byte ("Container failed to become ready: [" + err . Error () + "] \n " ))
243
+ log .Print ("Container failed to become ready: " , err )
244
244
return
245
245
}
246
246
execResp , err := docker .ContainerExecCreate (ctx , resp .ID , container.ExecOptions {
0 commit comments