DEV Community

Chris🌱Parnin
Chris🌱Parnin

Posted on

5

slim: Create a micro-vm from a Dockerfile

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.

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
Enter fullscreen mode Exit fullscreen mode

The resulting image is only 23MB! It can be used in virtual box, kvm, or hyper-kit.

Running a micro-vm

Provision a new instance of the given micro-vm image as a virtual machine.

$ slim run micro1 alpine3.8-simple
Enter fullscreen mode Exit fullscreen mode

Demo

This short demo illustrates an image being built, booting with hyper kit in 3 seconds, and then accessing the vm from ssh.

slim

Finding out more

Please see the GitHub repo for more information!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay