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

How to run Docker containers inside GNS3 with user namespaces enabled? #2414

Closed
smart2128 opened this issue Sep 8, 2024 · 8 comments · Fixed by #2416
Closed

How to run Docker containers inside GNS3 with user namespaces enabled? #2414

smart2128 opened this issue Sep 8, 2024 · 8 comments · Fixed by #2416

Comments

@smart2128
Copy link

Hi.
every time I try to instantiate a Docker appliance in GNS3, I receive the following error:

Error while creating node from template: Docker has returned an error: 400 privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode

Is there a way to properly handle this issue?

Thank you in advance,

@grossmj
Copy link
Member

grossmj commented Sep 17, 2024

What Docker image have you tried to use? Do you have this issue with any image?

@smart2128
Copy link
Author

Yes, I experience the same behavior with any images. I tried several images, (Alpine Linux, DNS, Open vSwitch, etc.).
Thank you for your answer.

@grossmj
Copy link
Member

grossmj commented Sep 19, 2024

Fixed, this should work in our next release.

@grossmj grossmj closed this as completed Sep 19, 2024
@smart2128
Copy link
Author

Hi Jeremy,
sorry for re-opening this issue.
I just installed v2.2.50, but, when I try to instantiate a Docker container in GNS3, I still get the same error

Error while creating node from template: Docker has returned an error: 400 privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode

Please, let me know if you need more details.

Regards,
Vincenzo

@grossmj grossmj reopened this Oct 22, 2024
@grossmj
Copy link
Member

grossmj commented Oct 23, 2024

Have you done anything to enable "user namespaces"?

@smart2128
Copy link
Author

smart2128 commented Oct 23, 2024 via email

@smart2128
Copy link
Author

I removed userns-remap and now it works as expected.
Forgive me for wasting your time.

@grossmj
Copy link
Member

grossmj commented Oct 26, 2024

Forgive me for wasting your time.

No worries, I actually have tested with userns-remap and indeed the previous fix didn't work because the param UsernsMode was in the wrong spot. I fixed that and now everything should work even when userns-remap is enabled.

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 a pull request may close this issue.

2 participants