It would be a useful enhancement to add a flag to codebuild_build.sh that supports running the build container as --privileged.
@jrowen - how is this helpful? Can you provide more context?
CodeBuild local already have Docker access, without needing a --privileged flag. Trying to understand what use case would a "--privileged" flag on the local version enable.
I found this flag was needed if my build was using something like s3fs-fuse.
Or mounting image blobs - i.e. need for losetup and mknod
@subinataws --privileged allows us to access kernel modules inside build containers. I wanted to use local CodeBuild within a Custom CodePipeline Action to run builds that require custom AMIs with custom kernel modules. Unfortunately local CodeBuild does not allow that currently without the --privileged flag passed to build containers.
Support added in https://github.com/aws/aws-codebuild-docker-images/pull/336. Thanks @awszhen
Most helpful comment
@subinataws
--privilegedallows us to access kernel modules inside build containers. I wanted to use local CodeBuild within a Custom CodePipeline Action to run builds that require custom AMIs with custom kernel modules. Unfortunately local CodeBuild does not allow that currently without the--privilegedflag passed to build containers.