Skip to content

feat: add privileged flag, allow adding absolute path for volume #186

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fredo
Copy link

@fredo fredo commented Jul 23, 2025

This PR exposes the privileged flag to be set for services. Additionally, we added a way to mount absolute paths from the filesystem to any service, which is useful if you want to bind /var/run/docker.sock

Note

At phylax systems, we used the builder-playground to generate our demo environment for OP-Talos.
During our work we made a small set of changes which are worth suggesting as upstream contributions.
I tried to split the work in several PRs, to let the maintainers decide what is worth to be included.

// WithAbsoluteVolume adds a volume mapping using an absolute path on the host.
// This is useful for binding system paths like /var/run/docker.sock.
// The path must be absolute and will be used as-is without any modification.
func (s *Service) WithAbsoluteVolume(containerPath string, hostPath string) *Service {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used it in our own components in our fork, especially for the case when binding paths which are not in the project path ~/.playground/devnet (like i.e. /var/run/docker.sock).
It is not being used in the standard builder-playground but we thought it might be useful to have it there for projects which fork the builder-playground and add their own components to it, like we did.
But I also understand if it's not desired to keep it upstream. Feel free to either close or approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants