Skip to content

Commit cfeb272

Browse files
committed
Invoke 'docker compose', rather than the legacy 'docker-compose' tool.
1 parent 2210b71 commit cfeb272

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/controller/DevController.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,25 +194,26 @@ export default class DevController {
194194
}
195195

196196
/**
197-
* Execute the docker-compose tool with the given arguments.
197+
* Execute the 'docker compose' tool with the given arguments.
198198
*/
199199
private dockerCompose(args: string[]): Promise<void> {
200200
args = args.slice(0);
201201
args.unshift('-f', this.composeFile);
202202
args.unshift('--project-directory', process.cwd());
203+
args.unshift('compose');
203204
let environment = Object.assign({}, process.env);
204205
if (this.devSpec.buildkit) {
205206
environment['COMPOSE_DOCKER_CLI_BUILD'] = '1';
206207
environment['DOCKER_BUILDKIT'] = '1';
207208
}
208209

209210
return new Promise((resolve, reject) => {
210-
let child = child_process.spawn('docker-compose', args, {
211+
let child = child_process.spawn('docker', args, {
211212
env: environment,
212213
stdio: 'inherit',
213214
});
214215
child.on('error', err => {
215-
reject('Unable to run docker-compose. Make sure it\'s installed and available in the system path.');
216+
reject('Unable to run the `docker` command-line tool. Make sure it\'s installed and available in the system path.');
216217
});
217218
child.on('close', status => {
218219
if (status == 0) {
@@ -225,7 +226,7 @@ export default class DevController {
225226
}
226227

227228
/**
228-
* Execute a command inside a container, using 'docker-compose exec'.
229+
* Execute a command inside a container, using 'docker compose exec'.
229230
*
230231
* @param container Compose service name
231232
* @param command The program to execute in the container

0 commit comments

Comments
 (0)