Skip to content

Commit fbcf278

Browse files
committed
sam: let SAM CLI check for docker
Problem: The Toolkit does its own check for "is docker running", which breaks use-cases such as when docker is running on another machine: #3588 Solution: Since we surface SAM CLI messages captured by collectSamErrors(), we don't need to check for Docker.
1 parent 6fcb85a commit fbcf278

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Toolkit no longer explicitly checks if Docker is running, instead it lets SAM CLI decide that #3588"
4+
}

src/shared/sam/localLambdaRunner.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,6 @@ export async function runLambdaFunction(
277277
config: SamLaunchRequestArgs,
278278
onAfterBuild: () => Promise<void>
279279
): Promise<SamLaunchRequestArgs> {
280-
// Verify if Docker is running
281-
const dockerResponse = await new ChildProcess('docker', ['ps'], { logging: 'no' }).run()
282-
if (dockerResponse.exitCode !== 0 || dockerResponse.stdout.includes('error during connect')) {
283-
throw new ToolkitError('Running AWS SAM projects locally requires Docker. Is it installed and running?', {
284-
code: 'NoDocker',
285-
})
286-
}
287280
// Switch over to the output channel so the user has feedback that we're getting things ready
288281
ctx.outputChannel.show(true)
289282
if (!config.noDebug) {

0 commit comments

Comments
 (0)