GithubHelp home page GithubHelp logo

boot2docker's Introduction

boot2docker

boot2docker is a lightweight Linux distribution based on Tiny Core Linux made specifically to run Docker containers. It runs completely from RAM, weighs ~38MB and boots in ~5-6s (YMMV).

It was made during the Global Docker Hack Day on Dec. 3, 2013.

Download

Head over to the Releases Page to grab the ISO.

How to use

Simply boot from the ISO, and you're done. It runs on VMs and bare-metal machines.

If you want your containers to persist accross reboots, just attach an ext4 formatted disk to your VM, and boot2docker will automount it on /var/lib/docker. It will also persist the SSH keys of the machine.

boot2docker auto logs in, but if you want to SSH into the machine, the credentials are:

login: docker
pass: tcuser

Demo

http://www.youtube.com/watch?v=QzfddDvNVv0 boot2docker Demo Video

Features

  • Kernel 3.12.1 with AUFS
  • Docker 0.7
  • LXC 1.0-alpha2
  • Container persistance via disk automount on /var/lib/docker
  • SSH keys persistance via disk automount

How to build

boot2docker is built with Docker, via Dockerfiles.

It is composed in three disctinct steps:

  • base: fetches, patches with AUFS support and builds the 3.12.1 Linux Kernel with Tiny Core base configuration
  • rootfs: builds the base rootfs for boot2docker (not complete)
  • running rootfs: when you run this image, it will build the rootfs, download the latest Docker release and create the .iso file on / of the container. This way you can update Docker without having to completely rebuild everything.

So the build process goes like this:

$ sudo docker build -t boot2docker-base base/
$ sudo docker build -t boot2docker rootfs/

Once that's done, to build a custom boot2docker.iso, just run the built rootfs image:

$ sudo docker run --privileged boot2docker
<CONTAINER_ID>
$ sudo docker cp <CONTAINER_ID>:/boot2docker.iso .

FAQ

Why not CoreOS?

I got asked that question a lot, so I thought I should put it here once and for all. I liked the original idea of CoreOS: the smallest possible way to boot to docker. Unfortunately CoreOS has been growing larger and just did too many things for me. I just wanted the fastest way to boot to Docker.

boot2docker's People

Contributors

archiloque avatar benjojo avatar erikj avatar jpetazzo avatar proppy avatar steeve avatar tianon avatar

Watchers

 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.