Skip to content

Commit 3266504

Browse files
authored
docs(ecs): document Podman as a Docker/Finch alternative (#35933)
docs(aws-ecs): Document Podman as a Docker/Finch alternative - Add Podman configuration examples in aws-ecr-assets README - Document DOCKER_HOST requirement for both Finch and Podman - Update CONTRIBUTING.md with Podman setup instructions - Provide community-tested alternative guidance for Docker licensing concerns Fixes #35833 ### Issue # (if applicable) Closes #35833. ### Reason for this change Users are facing Docker licensing issues and seeking alternatives like Podman for CDK container builds. The current documentation only mentions Finch as a Docker alternative but lacks: 1. Podman configuration examples despite it being a popular, lightweight Docker alternative 2. Critical DOCKER_HOST environment variable requirements for both Finch and Podman 3. Clear guidance on community-tested alternatives for users with Docker licensing concerns This creates a documentation gap that prevents users from successfully using Podman with CDK, even though it works with proper configuration. ### Description of changes **1. Enhanced aws-ecr-assets README.md:** - Added new "Docker Alternatives" section with structured examples - Documented exact Podman configuration: `CDK_DOCKER=podman` and `DOCKER_HOST=$(podman machine inspect...)` - Added missing DOCKER_HOST configuration for Finch - Included clear support level distinctions (AWS-supported vs community-tested) - Added explanatory note about DOCKER_HOST requirement for container daemon communication **2. Updated CONTRIBUTING.md:** - Extended Docker replacement documentation to include Podman - Added DOCKER_HOST requirement explanation for both Finch and Podman - Provided specific configuration example for Podman setup **3. Design decisions:** - Used the exact configuration validated by the issue reporter (@TrevorBurnham) - Maintained clear distinction between official AWS support (Finch) and community-tested alternatives (Podman) - Structured documentation to be copy-paste friendly for users - Positioned content logically after existing CDK_DOCKER explanation **4. Alternatives considered:** - Could have only documented Podman without DOCKER_HOST - rejected because it's critical for functionality - Could have provided minimal examples - rejected in favor of complete, working configurations - Could have avoided mentioning support levels - rejected because transparency is important ### Describe any new or updated permissions being added No new or updated IAM permissions are being added. This is purely documentation enhancement. ### Description of how you validated changes **Documentation validation:** - [x] Verified configuration examples match the working setup from issue #35833 - [x] Confirmed both CONTRIBUTING.md and aws-ecr-assets README.md are updated consistently - [x] Ensured documentation follows existing patterns and formatting - [x] Cross-referenced with existing Finch documentation for consistency - [x] Validated markdown formatting and code block syntax **Content validation:** - [x] Examples use the exact environment variables validated by the community - [x] Support level messaging aligns with AWS policy (official support for Finch, community-tested for Podman) - [x] Documentation addresses all points raised in the original issue ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 13b6480 commit 3266504

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ The following tools need to be installed on your system prior to installing the
222222
- [Python >= 3.8.0, < 4.0](https://www.python.org/downloads/release/python-380/)
223223
- Either [Docker >= 19.03](https://docs.docker.com/get-docker/), [Finch >= 0.3.0](https://runfinch.com/), or another Docker replacement
224224
- If using a Docker replacement, the `CDK_DOCKER` environment variable must be set to the replacement command's name (e.g. `export CDK_DOCKER=finch`)
225+
- For some Docker replacements like Podman, you may also need to set the `DOCKER_HOST` environment variable to specify the socket path
226+
- For Podman: `export DOCKER_HOST=$(podman machine inspect --format 'unix://{{.ConnectionInfo.PodmanSocket.Path}}')`
225227
- The Docker or replacement daemon must be running
226228
- [git-lfs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)
227229
- Without this, you'll get the message that the clone succeeded but the checkout failed when you initially clone the repo.

packages/aws-cdk-lib/aws-ecr-assets/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,29 @@ variable in order to provide a custom Docker executable command or path. This ma
5959
be needed when building in environments where the standard docker cannot be executed
6060
(see https://github.com/aws/aws-cdk/issues/8460 for details).
6161

62+
### Docker Alternatives
63+
64+
The CDK supports several Docker alternatives through the `CDK_DOCKER` environment variable:
65+
66+
#### Finch (AWS-supported)
67+
68+
```bash
69+
export CDK_DOCKER=finch
70+
```
71+
72+
**Note**: For Finch, you may also need to set the `DOCKER_HOST` environment variable. The socket path is OS-specific (e.g., on macOS: `unix:///Applications/Finch/lima/data/finch/sock/finch.sock`).
73+
74+
#### Podman (Community-tested)
75+
76+
```bash
77+
export CDK_DOCKER=podman
78+
export DOCKER_HOST=$(podman machine inspect --format 'unix://{{.ConnectionInfo.PodmanSocket.Path}}')
79+
```
80+
81+
**Note**: While Finch receives official AWS support, Podman is community-tested and may work for many use cases. The CDK doesn't check which Docker replacement you are using to determine if it's supported. If the tool has equivalent Docker commands and behaves similarly, it should work.
82+
83+
For some container runtimes, you may need to set the `DOCKER_HOST` environment variable to specify the correct socket path for the CDK to communicate with the container daemon.
84+
6285
SSH agent sockets or keys may be passed to docker build via `buildSsh`.
6386

6487
```ts

0 commit comments

Comments
 (0)