Skip to content

0xc0d/vessel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vessel

A tiny educational-purpose project to create containers, written in Go.

It basically is a tiny version of docker, it uses neither containerd nor runc. Only a set of the Linux features.

Features

Vessel supports:

  • Control Groups for resource restriction (CPU, Memory, Swap, PIDs)
  • Namespace for global system resources isolation (Mount, UTS, Network, IPS, PID)
  • Union File System for branches to be overlaid in a single coherent file system. (OverlayFS)

Read more

Here is the list of blog posts I've written about vessel:

  1. Build Containers From Scratch in Go (Part 1: Namespaces)
  2. To be continued...

Install

go get -u github.com/0xc0d/vessel

Usage

Usage:
  vessel [command]

Available Commands:
  exec        Run a command inside a existing Container.
  help        Help about any command
  images      List local images
  ps          List Containers
  run         Run a command inside a new Container.

Examples

Run /bin/sh in alpine:latest

vessel run alpine /bin/sh
vessel run alpine # same as above due to alpine default command

Restart Nginx service inside a container with ID: 123456789123

vessel exec 1234567879123 systemctrl restart nginx

List running containers

vessel ps

List local images

vessel images

Notice

vessel, obviously, is not a production ready container manager tool.