From d1861f07991e8c4a154e9e0d4dc200be9ff36f79 Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Sat, 6 Apr 2024 14:44:53 +0800 Subject: [PATCH] feat: add docker-compose (#253) --- src/helpers/virtualization.js | 8 ++++++++ src/presets.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/helpers/virtualization.js b/src/helpers/virtualization.js index 272ce96..356472c 100644 --- a/src/helpers/virtualization.js +++ b/src/helpers/virtualization.js @@ -9,6 +9,14 @@ module.exports = { ]).then(v => utils.determineFound('Docker', v[0], v[1])); }, + getDockerComposeInfo: () => { + utils.log('trace', 'getDockerComposeInfo'); + return Promise.all([ + utils.run('docker-compose --version').then(utils.findVersion), + utils.which('docker-compose'), + ]).then(v => utils.determineFound('Docker Compose', v[0], v[1])); + }, + getParallelsInfo: () => { utils.log('trace', 'getParallelsInfo'); return Promise.all([ diff --git a/src/presets.js b/src/presets.js index 099173a..347419a 100644 --- a/src/presets.js +++ b/src/presets.js @@ -29,7 +29,7 @@ module.exports = { 'Curl', ], Servers: ['Apache', 'Nginx'], - Virtualization: ['Docker', 'Parallels', 'VirtualBox', 'VMware Fusion'], + Virtualization: ['Docker', 'Docker Compose', 'Parallels', 'VirtualBox', 'VMware Fusion'], SDKs: ['iOS SDK', 'Android SDK', 'Windows SDK'], IDEs: [ 'Android Studio',