File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,23 @@ export function createContainer(
3737 '5900/tcp' : [ { HostPort : '' } ]
3838 }
3939 } as any )
40+ . then ( container => {
41+ const msg = style . bold . open + style . yellow . open + '==> ' + style . yellow . close +
42+ `starting container ` + style . yellow . open + name + ' ' + style . yellow . close +
43+ `from image ` + style . yellow . open + image + ' ' + style . yellow . close +
44+ `... ` + style . bold . close ;
45+ observer . next ( { type : 'data' , data : msg } ) ;
46+ return container ;
47+ } )
4048 . then ( container => container . start ( ) )
4149 . then ( container => container . inspect ( ) )
4250 . then ( info => observer . next ( { type : 'containerInfo' , data : info } ) )
51+ . then ( ( ) => {
52+ observer . next ( { type : 'data' , data : 'done.\r\n' } ) ;
53+ } )
4354 . then ( ( ) => observer . complete ( ) )
4455 . catch ( err => {
56+ observer . next ( { type : 'data' , data : 'error.\r\n' } ) ;
4557 observer . next ( { type : 'containerError' , data : err } ) ;
4658 observer . error ( err ) ;
4759 } ) ;
@@ -184,7 +196,7 @@ export function killContainer(id: string): Promise<void> {
184196 if ( containerInfo . State . Status === 'exited' ) {
185197 return container . remove ( ) ;
186198 } else if ( containerInfo . State . Status === 'running' ) {
187- return container . kill ( ) . then ( ( ) => container . remove ( ) ) ;
199+ return container . kill ( ) ;
188200 } else {
189201 return Promise . resolve ( ) ;
190202 }
You can’t perform that action at this time.
0 commit comments