bazelbuild / bazelbuild/rules_docker

Allow unprivileged containers on run_download.sh and run_install.sh

Open
#2,227 3 comments 0 reactions 0 assignees View on GitHub
Can Close?
Dominant language
Starlark
Stars
1.1k
Forks
689
PR merge metrics
No merged PRs in 30d

Description

# Allow configuration to remove the privileged flag

### Description

This feature request comes from the necessity of running Docker on continuous integration and deployment environments. Most of the times, the privileged flag is not allowed to be run on this environments due to security issues within their infrastructure. I don't know the direct implications with removing this flag, I've tried to run the .sh files generated without that flag and turns out no exception gets thrown.

These flags are on these `.sh` templates:

https://github.com/bazelbuild/rules_docker/blob/c823a69236c336f3d9478afb8f237dcf0fba1ea4/docker/package_managers/run_download.sh.tpl#L30-L33

https://github.com/bazelbuild/rules_docker/blob/c823a69236c336f3d9478afb8f237dcf0fba1ea4/docker/package_managers/run_install.sh.tpl#L53-L56

### Describe the solution you'd like

I'd like to have some configuration for these rules to disable the privileged mode for docker run command

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.