All Projects → viniciusbds → navio

viniciusbds / navio

Licence: MIT license
Navio is a program to create and manage linux containers. This project exists only for study purposes, so feel free to contribute :)

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to navio

geeks-for-geeks-solutions
Solutions of questions on Geeks-for-Geeks.Solution Available in C++.
Stars: ✭ 28 (+100%)
Mutual labels:  hackoctoberfest, hacktoberfest-accepted, hacktoberfest2021
HacktoberFest2021
No description or website provided.
Stars: ✭ 33 (+135.71%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
HacktoberFest21
A beginner friendly repository for HacktoberFest 2021
Stars: ✭ 45 (+221.43%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
college-management-react
This is a College management web app in MERN stack.
Stars: ✭ 42 (+200%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
ProjectSakura.github.io
Our official website, download center and blog.
Stars: ✭ 26 (+85.71%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
typiform
⚛️ A serverless React powered online form builder that works like a doc.
Stars: ✭ 16 (+14.29%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Data-Structures-and-Algorithms
No description or website provided.
Stars: ✭ 108 (+671.43%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Python Scripts
A collaborative repository that contains various types of python scripts
Stars: ✭ 14 (+0%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Rboxlo
Roblox private server
Stars: ✭ 173 (+1135.71%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
1stHacktoberfest
Web / Android app base on Flutter(2.5.2).
Stars: ✭ 35 (+150%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Hacktoberfest-Indonesia-2021
Event Hacktoberfest Indonesia 2021
Stars: ✭ 42 (+200%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Fenice-Network
Building the job search portal which helps both recruiters and job seekers to get perfect jobs.
Stars: ✭ 20 (+42.86%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Frontend-Animations
Frontend Animation Projects.🚀
Stars: ✭ 20 (+42.86%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Hacktoberfest-2021
❗❗ Make your first PR now, accepting and merging PRs continuously. ⭐HACKTOBER ACCEPTED 2021 ✨✨Happy Hacking 💖💖
Stars: ✭ 11 (-21.43%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Hacktoberfest2021
Hacktoberfest is open to everyone in our global community. Whether you’re a seasoned contributor or looking for projects to contribute to for the first time, you’re welcome to participate.
Stars: ✭ 9 (-35.71%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
College-Notes
Contribute your handwritten PDF notes and help other students ✌ #DecodersCommunity 🖤
Stars: ✭ 30 (+114.29%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Poke-Dex
This is a small webpage that allows user to add their favourite Pokémons! This project aims to help people in creating their first pull requests and participating in Hacktoberfest 2021
Stars: ✭ 126 (+800%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
autocorr kr
리브레오피스(LibreOffice) 자동 교정(Autocorrect)기능에 대한 말모이 저장소
Stars: ✭ 15 (+7.14%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
Hacktoberfest
In this repository you can contribute quality code in languages you are comfortable with during the Hacktoberfest event. Raise Genuine PR's Only your. You aren't allowed to Update README.md. Invalid PR's is not supported here.
Stars: ✭ 20 (+42.86%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021
HacktoberFest-2021
A repository for Hacktober Fest contributions. Everyone is welcome. Fork away!
Stars: ✭ 10 (-28.57%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2021

Navio

build badge tests badge

drawing

Navio is a simple tool for creating and managing linux containers.

A container is a set of processes isolated by Linux namespaces. We use, for example, PID namespace to isolate the PID number space, UTS to isolate the hostname and MOUNT to isolate the filesystem mount points.

All containers have their own rootfs (a isolated "mini operating system") associated, so that a change (for example, an installation of any library or a creation of a file) in a container does not affect others ones.

It is also possible use Cgroups to limit the amount of resources that each container can use.

Why?

For study purposes only. If you want to use real containers use Docker or Containerd.

Available Default Images

Image version size
alpine v3.11 2.7M
busybox v4.0 1.5M
ubuntu v20.04 90M

These are the default images, but you can easily create your own images with the packages and files you find necessary. For example, with the following Naviofile:

FROM ubuntu    

ADD . /mydir

RUN apt update && apt upgrade -y && apt install python -y
cd /path/to/Naviofile
sudo navio build . --t python-image

we created an image with python installed, so the containers that use this image will already have python installed by default, as well the files from the current directory that will be copied to the /mydir directory in the container.

Demo

4 cpus

Namespaces

what the processes can see

  • UTS - isolate hostname and domainname

  • PID - isolate the PID number space

  • MNT - isolate filesystem mount points

Cgroups

what the processes can use

  • Memory

  • CPU

  • Process numbers

Available Commands

4 cpus

How to use

To create a basic container just type:

sudo navio create ubuntu bash

But you can use some flags, ex:

--name ubuone to define the name of container

--pids 25 to limit the maximum number of processes that the container can create

--cpus 0-3 to limit the cpu cores that the container can use. For example, in this case (0-3) if you computer have at least 4 cores, this flag will permit that the process of container use only 4 cores, no more

--cpus-share 100

--memory 1G to limit the maximum memory RAM that the container can use

Limiting the container to use only 4 cpu cores

4 cpus

Building new Images

To build a image you need first create a Naviofile with the base image and the commands.

build new images

Limitations

  • The network is not being isolated and is only working on the ubuntu image.
  • The Navio does not allow containers to run in the background.
  • The Navio does not limit the use of I/O

Requirements

  • linux. Navio's doesn't support other operational system :(
  • golang environment
  • make
  • wget
  • mysql configured with the root password == root
  • some of commands (ex.: navio build, navio create, navio rmi and navio exec) must be executed with sudo privilegies.

How to install

1°: we assume that your root mysql database user and password is 'root', feel free to change it locally.

If you just want use, is very simples

 git clone https://github.com/viniciusbds/navio.git
 cd navio
 ./install.sh

If you want compile the code before install

 git clone https://github.com/viniciusbds/navio.git
 cd navio
 make
 ./install.sh

To run all unit tests, type

 cd /path/to/project/navio
 sudo make unit-tests

To uninstall

 cd navio
 ./uninstall.sh

Example Commands

$ navio images
$ sudo navio create ubuntu bash --name mycontainer`
$ navio containers
ID	   NAME	   	   IMAGE  	COMMAND  	STATUS

14806622   mycontainer     ubuntu  	bash  		Stopped
$ sudo navio exec 14806622 bash 
$ navio rename 14806622 new_name
$ sudo navio create busybox sh
$ sudo navio create alpine /bin/sh --name levezin

Contributing

You can contribute to the project in any way you want, either by fixing bugs, implementing new features, improving the documentation or proposing new features through issues

See Contributting for more details

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].