runfinch / finch

The Finch CLI is an open source client for container development
https://www.runfinch.com
Apache License 2.0
3.58k stars 95 forks source link

AWS SAM CLI compatibility #287

Open scottschreckengaust opened 1 year ago

scottschreckengaust commented 1 year ago

What is the problem you're trying to solve?. Ability to run the AWS SAM CLI:

% sam local invoke
Error: Running AWS SAM projects locally requires Docker. Have you got it installed and running?

Describe the feature you'd like Ability to use Finch interchangeably for Docker.

Additional context

russau commented 1 year ago

There’s a related issue on SAM side https://github.com/aws/aws-sam-cli/issues/4584

My understanding: SAM talks to the docker socket where finch doesn’t expose a socket.

estesp commented 1 year ago

@russau that's correct, and specifically, the reason Docker exposes a UNIX socket is that Docker's engine is built around an API, the Docker Engine API, and the Docker client is simply a RESTful HTTP client to this same engine API.

Finch is built on top of containerd directly, which has a Go SDK built around a gRPC API. Nerdctl is the actual Go client to containerd and Finch simply passes through commands to nerdctl to execute against the containerd runtime engine. There is no Docker engine HTTP API involved in this stack, so there is no ability to expose that HTTP API for other users, like SAM and other client tools which are built on libraries that use the Docker API as a client.