Giter VIP home page Giter VIP logo

conair's Introduction

Conair - an opinionated Docker clone

Without these tools you are probably screwed. PRs are welcome!

  • archlinux/CoreOS
  • systemd-nspawn
  • systemd-networkd (systemd 215+)
  • systemd-machined (systemd 219+)
  • (btrfs)

Build

Install go and run make. This will install conair to /usr/local/bin:

make && make install

If you don't have a btrfs partition/root then you can create a loopback device with btrfs and mount it to /var/lib/machines. I wrote a little tool called loopback for it.

sudo loopback create --name=conair --size=10 /var/lib/machines

Usage

Initialize your environment with:

conair init

Most of the times conair requires root privileges. So make sure to prepend sudo.

Create a base image:

conair bootstrap base # if you are on archlinux (pacstrap required)
conair pull base     # download an image

Or DIY:

btrfs subvolume create /var/lib/machines/base
pacstrap -i -c -d /var/lib/machines/base base

Build an image

Dockerfiles and Conairfiles are supported. FROM, RUN and ADD are implemented. Conairfiles support PKG and ENABLE to install pacman packages and enable systemd units.

conair build my-new-image

Commands

conair init      # Setup a bridge for the containers and add some iptables forwarding
conair destroy   # Remove bridge, iptables and unit file
conair images    # List all available conair images
conair run       # Run a container
conair ps        # List all conair containers
conair start     # Start a container
conair stop      # Stop a container
conair status    # Status of container
conair attach    # Attach to container
conair commit    # Commit a container
conair rm        # Remove a container
conair rmi       # Remove an image
conair pull      # Pull an image
conair bootstrap # Creates an arch rootfs with pacstrap.
conair help      # Show a list of commands or help for one command
conair version   # Print the version and exit

Why?

  • For the fun of it
  • Proper systemd integration
  • No need to use supervisord if you need to run multiple services within the same container
  • All CoreOS components in a single container
  • Systemd
  • Fleet
  • Etcd
  • Docker

conair's People

Contributors

teemow avatar webwurst avatar

Watchers

 avatar  avatar  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.