Giter Site home page Giter Site logo

docker2usb's Introduction

docker2usb

Crazy shell script to convert a docker container to a bootable usb image. Note that not any old docker image will work and this has only been validated with CentOS.

The image must be specially prepared with:

  • A squashfs.sh script at the root
  • kernel installed
  • vmlinux and initramfs copied to /syslinux
  • /syslinux/syslinux.cfg prepared
  • Any additional files required for the OS to run in livecd mode (like additional dracut config for centos)

We were regularly building large bootable usb images for appliances using livecd tools. They left something to be desired in terms of speed, ease of use and reliability so we decided to see if docker images could be abused for it.

We got it to the stage where the image would boot but did not go any further.

If you want to play with it you will need to do so on a linux system and I recommend inside a VM. The script must run as root for various reasons (mainly block device manipulation / mounting) and if it errors out but doesn't clean up then it may leave block devices or loopback devices laying around which are in finite supply and may require a reboot to free (depending on how and why it failed).

This repo is for archival purposes, made public in case it is useful to anyone as I have no intention to advance it further.

docker2usb's People

Contributors

mikesimons avatar

Stargazers

Joachim Thirsbro avatar

Watchers

James Cloos avatar  avatar

Forkers

edgenos1 pasdenv

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.