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 install packages on L3 components #51

Closed
Pazitos10 opened this issue Jan 31, 2016 · 4 comments
Closed

How to install packages on L3 components #51

Pazitos10 opened this issue Jan 31, 2016 · 4 comments

Comments

@Pazitos10
Copy link

I've been recently using imunes to simulate small networks and running some examples with iptables. Now I'm trying to do some vpn examples with openvpn and easy-rsa but those packages are not installed on L3 components. How can I install those?

I know that I can install it running apt-get install but I have to run apt-get update first. When I do it, it returns the following message: "Err [debian updates Release.gpg URLs]" and "W: Failed to fetch [debian_repos]". I think that means I have no internet connection, so the real question is how can I use the host connection for update and install packages?

Thanks in advance!

@denisSal
Copy link
Member

denisSal commented Feb 1, 2016

Hello!

The simplest (and the best) way to do this on Linux for now is to rebuild the whole docker image locally with the new packages.
To do this, first fetch the vroot-linux repository: https://github.com/imunes/vroot-linux.git
Then modify image/utilities.sh and add your packages to the list.
Next, run:

# cd image
# sudo docker build -t imunes/vroot .

After the build is done, every node on newly created experiments will have these packages installed.

If you do not do this, you would have to install the same packages every time you start the experiment (because every node is a container that doesn't keep the changes on its filesystem).

@Pazitos10
Copy link
Author

@denisSal Worked perfectly! Thank you very much for your help.

I added: openvpn easy-rsa bridge-utils to image/utilities.sh and rebuilt the image. Now I can keep working on my examples.
Just a last question, how can I "freeze" my docker images so if I forget to add a package I don't have to rebuilt the whole image from "scratch".

@denisSal
Copy link
Member

denisSal commented Feb 1, 2016

Hi, glad to see it worked. :)

You could create your own template image and change the line

set VROOT_MASTER "imunes/vroot"

to

set VROOT_MASTER "your_image"

in runtime/linux.tcl. Then, you will always use your own image with your custom built packages but you won't be able to receive official image updates if we change anything.

I'm on my mobile phone, so I'm not sure what exactly to do, but you should check Docker documentation on how to do that.

@Pazitos10
Copy link
Author

Ok, thanks again for your help and this alternative solution! ... I will check Docker documentation to see if there's a way to do what I want to do too :D .

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

2 participants