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';
2
2
import * as Docker from 'dockerode' ;
3
3
import * as path from 'path' ;
4
4
5
+ import { delay } from '../../util/promise' ;
6
+
5
7
import { getTerminalEnvVars } from '../terminal/terminal-env-overrides' ;
6
8
import { transformComposeCreationLabels } from './docker-compose' ;
7
9
import { getDockerDataVolumeName } from './docker-data-injection' ;
@@ -214,6 +216,11 @@ export async function restartAndInjectContainer(
214
216
}
215
217
} ) ;
216
218
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
+
217
224
// First we clone the continer, injecting our custom settings:
218
225
const newContainer = await docker . createContainer (
219
226
await transformContainerCreationConfig (
You can’t perform that action at this time.
0 commit comments