create a bootable disk image from Docker image or a yaml config

docker2boot

docker2boot creates a bootable disk from either a Docker image or a config yaml file

Features

status
dns Y
cloud-init Y
network Y
ssh TODO

Platforms

bios uefi console network
qemu Y Y Y Y
openstack Y Y Y Y
aws Y y Y Y
gce todo todo todo todo

Build

sudo apt-get install libguestfs-tools cloud-utils

make build to produce docker2boot.

Run and boot

prerequisite

To run guestfish without sudo, use:

sudo chmod 0644 /boot/vmlinuz*

see guestfish faq for more information.

Run

1. Create bootable image from a docker image

(optional) Build the reference docker image binc/myos:lastest

cd ./images
make

Convert it to bootable image disk.img

./docker2boot -image binc/myos:latest -out disk.img

2. Create a bootable image from config yaml

./docker2boot -config config.yaml -out disk.img

To Boot the created disk.img:

make boot

You can login the console with root:root and curl www.google.com. VM is ready for use.

docker image

d2bimage="binc/d2b:v$(cat VERSION)"
docker run -v $(pwd):$(pwd) \
    -v /var/run/docker.sock:/var/run/docker.sock \
    ${d2bimage} \
    -config $(pwd)/config.yaml \
    -output $(pwd)/disk.img \
Owner
Bin Chen
Container, Linux, Cloud (clc)
Bin Chen
Similar Resources

Sidecar to watch a config folder and reload a process when it changes

A small (3MB uncompressed docker image), efficient (via inotify) sidecar to trigger application reloads when configuration changes.

Dec 29, 2022

Little Go tool to infer an uncrustify config file from an expected format

uncrustify-infer Little Go tool to infer an uncrustify config file from an expected format Install This tool relies on an uncrustify executable, you m

Oct 8, 2021

Ewwwwwww - Yuck Config

Ewwwwwww - Yuck Config

Eww Config What is it Using Eww Widgets to create a replacement for my bumblebee-status bars in i3 Window Manager. Eww allows you to create widgets an

Dec 29, 2022

A lightweight config center written by golang.

A lightweight config center written by golang.

Jan 21, 2022

Project my config into your prebuild

Projector A simple key value store per path. Building From Source git clone [email protected]:ThePrimeagen/projector.git cd projector # Install it where

Jun 23, 2022

Simple Config Format for Golang.

IndentText Simple Configuration Format that tries to be easy to use and understand at a glance. Unlike other formats, IndentText does not have any typ

Nov 26, 2021

Viper wrapper with config inheritance and key generation

piper - Simple Wrapper For Viper Single Source of Truth Generated Key Structs, No Typo Config Inheritance Multiple Config Strategies Support Cache For

Sep 26, 2022

A viewer for creating a one-page app that renders the config file as a webpage.

Matterbridge Config Viewer A viewer for creating a one-page app that renders the config file as a webpage. Local Development npm install npm run-scrip

Jul 9, 2021

App that generates a Matterbridge config file based on channel names.

Matterbridge Auto-Config App that generates a Matterbridge config file based on channel names. This remote configuration file* is generated based on s

Oct 15, 2022
⚙️ Dead Simple Config Management, load and persist config without having to think about where and how.

Configo Dead Simple Config Management, load and persist config without having to think about where and how. Install go get github.com/UltiRequiem/conf

Apr 6, 2022
Golang config.yaml loader

Description goconfig is a configuration library designed using the following pri

May 31, 2022
Go-yaml - Yaml parsing Toolkit For Golang

go-yaml 介绍 gopkg.in/yaml.v3 已经是个非常好用的包,但是在实际开发中总有类型转换带来的麻烦,go-yaml只是在它的基础上,简单的一层

Jan 13, 2022
Simple, useful and opinionated config loader.

aconfig Simple, useful and opinionated config loader. Rationale There are many solutions regarding configuration loading in Go. I was looking for a si

Dec 26, 2022
A lightweight yet powerful config package for Go projects

Config GoLobby Config is a lightweight yet powerful config package for Go projects. It takes advantage of env files and OS variables alongside config

Dec 11, 2022
go implementation of lightbend's HOCON configuration library https://github.com/lightbend/config

HOCON (Human-Optimized Config Object Notation) Configuration library for working with the Lightbend's HOCON format. HOCON is a human-friendly JSON sup

Dec 3, 2022
Composable, observable and performant config handling for Go for the distributed processing era

Konfig Composable, observable and performant config handling for Go. Written for larger distributed systems where you may have plenty of configuration

Dec 11, 2022
🔥🔥 🌈 Golang configuration,use to Viper reading from remote Nacos config systems. Viper remote for Naocs.

Viper remote for Nacos Golang configuration,use to Viper reading from remote Nacos config systems. Viper remote for Naocs. runtime_viper := viper.New(

Dec 6, 2022
Nacos is a service config & discovery.

Kratos Nacos example sc := []constant.ServerConfig{ *constant.NewServerConfig("127.0.0.1", 8848), } cc := &constant.ClientConfig{ NamespaceId:

Oct 28, 2021