File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import * as _ from 'lodash';
22import * as Docker from 'dockerode' ;
33import * as path from 'path' ;
44
5+ import { delay } from '../../util/promise' ;
6+
57import { getTerminalEnvVars } from '../terminal/terminal-env-overrides' ;
68import { transformComposeCreationLabels } from './docker-compose' ;
79import { getDockerDataVolumeName } from './docker-data-injection' ;
@@ -214,6 +216,11 @@ export async function restartAndInjectContainer(
214216 }
215217 } ) ;
216218
219+ // There can be a delay here - wait until the container disappears
220+ while ( await container . inspect ( ) . catch ( ( ) => false ) ) {
221+ await delay ( 100 ) ;
222+ }
223+
217224 // First we clone the continer, injecting our custom settings:
218225 const newContainer = await docker . createContainer (
219226 await transformContainerCreationConfig (
You can’t perform that action at this time.
0 commit comments