docker-run without run if image already exists

This commit is contained in:
Joan Sanchez 2018-04-26 15:40:31 +02:00
parent e4b536e439
commit 060b2ec0ff
1 changed files with 2 additions and 3 deletions

View File

@ -474,12 +474,11 @@ gulp.task('docker-start', async () => {
gulp.task('docker-run', async () => { gulp.task('docker-run', async () => {
try { try {
await execP('docker image inspect -f "{{json .Id}}" dblocal'); await execP('docker image inspect -f "{{json .Id}}" dblocal');
await execP('docker run -d --name dblocal -p 3306:3306 dblocal');
await runSequenceP('docker-wait');
} catch (err) { } catch (err) {
await runSequenceP('docker-image'); await runSequenceP('docker-image');
} }
await execP('docker run -d --name dblocal -p 3306:3306 dblocal');
await runSequenceP('docker-wait');
}); });
/** /**