-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
I'd like to use Podman to build images when using aws_ecs.ContainerImage.fromAsset("folder")
Use Case
Podman allows me to build and run containers locally without any elevated privileges while maintaining basically the same command line interface as regular Docker. My distribution even provides a /usr/bin/docker file that forwards all commands to podman so most of the time, invoking docker run ... just works.
For the commands aws-cdk currently use, everything works apart from docker inspect, which returns a different error code than docker on failure.
Proposed Solution
I've patched this file locally and have been deploying stuff with aws-cdk for a few months based on this:
- if (e.code !== 'PROCESS_FAILED' || e.exitCode !== 1) { throw e; }
+ if (e.code !== 'PROCESS_FAILED' || ![1, 125].includes(e.exitCode)) { throw e; }Other
As above the immediate fix is pretty simple. Reason I didn't want to open a PR just yet is because I'm not sure how to add tests for this, if it needs to be running real podman or not for example. Another option would be to just change that to checking any failure and tests could still possibly pass
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request