AssetStaging: DockerVolume
uses Bind Mount with BundlingFileAccess set to VOLUME_COPY
#32805
Labels
@aws-cdk/aws-ecr
Related to Amazon Elastic Container Registry
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Setting
bundling.bundlingFileAccess: BundlingFileAccess.VOLUME_COPY
in AssetStaging still uses bind mounts for additional volumes created throughbundling.volumes
. The language in the docs does not make this explicitly clear, and leaves no good way to use additional volumes in envs where bind mounts are unavailable (e.g. DinD)Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
When using
BundlingFileAccess.VOLUME_COPY
, I expect all volumes to use the volume copy behaviourCurrent Behavior
Additional volumes use bind mounts regardless of
bundlingFileAccess
settingReproduction Steps
Use AssetStaging with BundlingFileAccess.VOLUME_COPY set and an additional volume mounted
Possible Solution
Rewrite the
AssetStaging
class to mount all volumes via the VOLUME_COPY mechanism instead of only the input and output. Alternately, extend DockerVolume as suggested in #20601 to allow each volume provided to choose its binding type (bind mount, volume copy, existing volume)Additional Information/Context
No response
CDK CLI Version
2.174.0 (build 9604329)
Framework Version
No response
Node.js Version
v20.13.1
OS
Ubuntu
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: