cloudstructs icon indicating copy to clipboard operation
cloudstructs copied to clipboard

Docker requirement necessary for ToolkitCleaner?

Open perpil opened this issue 1 year ago • 2 comments

Thank you for creating this! It's super helpful.

I was using ToolkitCleaner and noticed it required Docker running, which I believe is due to this.

I don't use ECR currently and I'm wondering whether it would be possible to have a property in ToolkitCleanerProps to conditionally deploy the image cleanup code/step function branch so Docker isn't necessary. Does DOCKER_IMAGE_ASSET_HASH need to be set from dockerImageAsset or could it be set from fileAsset?

If this is possible and makes sense, let me know, I'd be happy to attempt submitting a PR.

perpil avatar Apr 28 '24 19:04 perpil

Hi @perpil,

Maybe we can introduce a prop cleanEcrAssets?: boolean that defaults to true?

Does DOCKER_IMAGE_ASSET_HASH need to be set from dockerImageAsset or could it be set from fileAsset?

From dockerImageAsset, but if we don't deploy the ECR part we don't need this env var in the runtime code to search for asset hashes.

jogold avatar Apr 29 '24 18:04 jogold

A cleanEcrAssets property makes sense. Thanks for the clarification on dockerImageAsset. I'll try to implement this when I get some time.

perpil avatar Apr 29 '24 19:04 perpil