-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
gvisor and network=host #11388
Comments
the short answer is that it will be less secured on networking please see https://gvisor.dev/docs/user_guide/networking/#network-passthrough, using
I can't reproduce the issue by
I would like to see more from your runsc config and docker config |
This is my
When i use in docker config
services communicate each other and can access github.com which is external. When i use in docker config
services communicate with each other but cant resolve github.com. |
Also ,defining dns in compose doesnt seem to work for runsc containers.As far as I have understand when you create a define bridge network in docker it creates a DNS which is not accessible from runsc environment.So I thought that i could add DNS 8.8.8.8 in order to give DNS to this services but it did not work |
Any comments/ suggestions? |
how about bind mount /etc/resolv.conf in container? |
Description
Hello,
I'm using gVisor with Docker Compose and have encountered a network-related issue. From what I understand, when you create a user-defined bridge network, Docker sets up a DNS system for the containers. However, containers running with runsc can't access this DNS system due to the sandbox, and as a workaround, I have been using static IPs for communication between services.
The problem arises when I set the network of runsc to host, as my services can then reach external resources like github.com. Without setting network=host, my services can communicate with each other, but they cannot reach external resources like GitHub. Then i get
fatal: unable to access 'https://github.com/<github_user>/<repo_name>/': Could not resolve host: github.com
.This happens for every repo i try to access.My question is: if I use network=host, do I lose all the security advantages that gVisor provides? Is there a safer workaround for allowing my containers to access external resources while maintaining gVisor's security benefits?
Thanks in advance for your help!
Steps to reproduce
No response
runsc version
docker version (if using docker)
uname
No response
kubectl (if using Kubernetes)
repo state (if built from source)
No response
runsc debug logs (if available)
The text was updated successfully, but these errors were encountered: