Giter Club home page Giter Club logo

slim's Introduction

Build Status

slim

slim will build a micro-vm from a Dockerfile. Slim works by building and extracting a rootfs from a Dockerfile, and then merging that filesystem with a small minimal kernel that runs in RAM.

This results in a real VM that can boot instantly, while using very limited resources. If done properly, slim can allow you to design and build immutable unikernels for running services, or build tiny and embedded development environments.

Using slim

Build a micro-vm

Create a micro-vm from a Dockerfile. Use build command with a directory containing a Dockerfile.

$ slim build images/alpine3.8-simple

build

This will add a bootable iso in the slim registry. See example Dockerfile.

Listing micro-vm images

See a list of micro-vm images on your machine.

$ slim images

images command

Running a micro-vm

Provision a new instance of the given micro-vm image as a virtual machine (using virtualbox). Use -p kvm or -p hyperkit to switch providers.

Using hyperkit (available on macOS).

$ slim run micro1 alpine3.8-simple -p hyperkit

nanobox

Using virtualbox (default).

$ slim run micro2 alpine3.8-simple

nanobox

VirtualBox will run the micro-vm instance as an attached iso loaded into a cdrom, and boot up the iso in seconds.

For convenience, a ssh connection command is provided at the end of the command, allowing easy access into the machine: Example: ssh -i /Users/cjparnin/.slim/baker_rsa [email protected] -p 2008 -o StrictHostKeyChecking=no

Installing slim

Simply clone this repo and run.

npm install
npm link

Unfortunately, due to the experimental nature, there are a few system dependencies you must also install:

  • docker, for building and extracting the kernel and filesystem.
  • cdrtools: brew install cdrtools, for building the micro-vm iso.

To boot and run the image, you also need a hypervisor:

For kvm, you can install the following dependencies for ubuntu:

sudo apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker mkisofs

slim's People

Contributors

chrisparnin avatar gjabell avatar ssmirr avatar stephengroat avatar dependabot-preview[bot] avatar dependabot[bot] avatar paralax avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.