Skip to content

Commit

Permalink
Merge pull request #660 from devcontainers/samruddhikhandale/authz-pl…
Browse files Browse the repository at this point in the history
…ugin-compose

Docker compose: Updates create error description to include cause for docker auth plugin errors
  • Loading branch information
samruddhikhandale committed Oct 24, 2023
2 parents c377116 + 5ce1f6c commit 5a5a9b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/spec-node/dockerCompose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,13 @@ async function startContainer(params: DockerResolverParameters, buildParams: Doc
}
} catch (err) {
cancel!();
throw new ContainerError({ description: 'An error occurred starting Docker Compose up.', originalError: err, data: { fileWithError: localComposeFiles[0] } });

let description = 'An error occurred starting Docker Compose up.';
if (err?.cmdOutput?.includes('Cannot create container for service app: authorization denied by plugin')) {
description = err.cmdOutput;
}

throw new ContainerError({ description, originalError: err, data: { fileWithError: localComposeFiles[0] } });
}

await started;
Expand Down

0 comments on commit 5a5a9b2

Please sign in to comment.