Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unprivileged containers on run_download.sh and run_install.sh #2227

Open
KennethGomez opened this issue Mar 3, 2023 · 3 comments
Open
Labels
Can Close? Will close in 30 days unless there is a comment indicating why not

Comments

@KennethGomez
Copy link

KennethGomez commented Mar 3, 2023

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:

# Run the builder image.
cid=$("$DOCKER" $DOCKER_FLAGS run -w="/" -d --privileged $image_id sh -c $'%{download_commands}')
"$DOCKER" $DOCKER_FLAGS attach $cid
"$DOCKER" $DOCKER_FLAGS cp $cid:%{installables}_packages.tar %{output}

cid=$("$DOCKER" $DOCKER_FLAGS run -d -v $vid:/tmp/pkginstall --privileged $image_id /tmp/pkginstall/installer.sh)
"$DOCKER" $DOCKER_FLAGS attach $cid || true

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

@KennethGomez
Copy link
Author

I can write a PR for this if wanted and needed!

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!

@github-actions github-actions bot added the Can Close? Will close in 30 days unless there is a comment indicating why not label Sep 4, 2023
Copy link

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

@alexeagle alexeagle reopened this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? Will close in 30 days unless there is a comment indicating why not
Projects
None yet
Development

No branches or pull requests

2 participants