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

[Feature]: Add optional container user namespace for Ryku #2684

Open
scorpionknifes opened this issue Aug 6, 2024 · 1 comment · May be fixed by #2702
Open

[Feature]: Add optional container user namespace for Ryku #2684

scorpionknifes opened this issue Aug 6, 2024 · 1 comment · May be fixed by #2702
Labels
feature New functionality or new behaviors on the existing one

Comments

@scorpionknifes
Copy link

scorpionknifes commented Aug 6, 2024

Problem

I'm working with a CI/CD environment that requires me to run Ryku with privileged and user namespace to be 'host'

I'm getting the following error when running Ryku in privileged mode, I need to manually pass in a user namespace.

docker: Error response from daemon: privileged mode is incompatible to user namespaces. You must run the container in the host namespace when running privileged mode'

Example docker cli:

docker run --privileged --userns host -it  -v /var/run/docker.sock:/var/run/docker.sock -p 8080 testcontainers/ryuk:0.8.1 sh

Solution

Create a option or config/env such as TESTCONTAINERS_RYUK_CONTAINER_USER_NAMESPACE to be configured to pass in as userns for Ryku

I'm currently have it successfully running with the following changes: mx51@59dc7da

Benefit

Allow users to run Ryku in privileged mode with host namespace

Alternatives

Pass it in with an option to create a container.

Would you like to help contributing this feature?

Yes

@scorpionknifes scorpionknifes added the feature New functionality or new behaviors on the existing one label Aug 6, 2024
@stevenh
Copy link
Collaborator

stevenh commented Aug 7, 2024

Looks reasonable to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants