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 add new network interface , such as ethX to runc instance? #83

Closed
cloudtrends opened this issue Jul 3, 2015 · 5 comments
Closed

Comments

@cloudtrends
Copy link

hi all,

I am using a centos base image to running runc instance .

After enter into the runc instance , I could found the default generated network interface file:
/etc/sysconfig/network-scripts/ifcfg-ens3

After config the above file , what confused me is that : there is no support such as :

  1. service network restart or
  2. /etc/init.d/network
    none above files exists in the runc instance .

Why I need the network interface is because that I want run a network service in runc , such as :

python -m SimpleHTTPServer 8000

And above service can visited from outside of runc environment .

Can I archive this with runc ?

@kgrvamsi
Copy link

kgrvamsi commented Jul 6, 2015

i think the filesystem when the runc mounts will be a read only filesystem through rootfs and in returns dont create any pid files or saves any data in the necessary locations .I have this read-only issue when i was trying to check on some of the running resources packaged inside the container image

@wking
Copy link
Contributor

wking commented Jul 8, 2015

On Thu, Jul 02, 2015 at 08:27:23PM -0700, ChunFeng wrote:

Why I need the network interface is because that I want run a
network service in runc…

I'm not clear on the systemd connection that @kgrvamsi was suggesting,
but to me this sounds like a duplicate of #37.

@kgrvamsi
Copy link

kgrvamsi commented Jul 8, 2015

oh sorry if i'm wrong but the reffered issue gives me a light on this to try within the mounted container

 "root": {
    "path": "rootfs",
    "readonly": false 
   },

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 8, 2015

@cloudtrends Now I think you can only create interface connected to host and then move it to your container namespace :/ Libcontainer has basic veth pair support though.

@crosbymichael
Copy link
Member

You can see my response here for how to setup networking for containers spawned by runc

#201 (comment)

Thanks!

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

No branches or pull requests

5 participants