https://github.com/purplesyringa/docker-boot Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} purplesyringa / docker-boot Public * Notifications * Fork 0 * Star 5 * Like `execve`, but for userspace License WTFPL license 5 stars 0 forks Branches Tags Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights purplesyringa/docker-boot This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 17 Commits src src .gitignore .gitignore LICENSE LICENSE Makefile Makefile README.md README.md View all files Repository files navigation * README * WTFPL license docker-boot dboot.mp4 Like execve, but for userspace. docker-boot replaces your current running system with an in-memory root filesystem constructed from a Docker image. Example with GUI: Dockerfile FROM ubuntu RUN apt update RUN apt-get install -y software-properties-common && add-apt-repository ppa:mozillateam/ppa RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo htop systemd sddm kde-plasma-desktop firefox-esr RUN useradd --create-home --shell /bin/bash --groups sudo --password "$(perl -e "print crypt('cutie', 'sa');")" --user-group purplesyringa RUN echo "InputMethod=" >/etc/sddm.conf $ docker build . -t workstation <...> $ sudo docker-boot workstation /bin/systemd Example without GUI: Dockerfile $ sudo docker-boot ubuntu /bin/bash -c "mount -t proc proc proc; mount -t sysfs sys sys; exec bash -i" (Or make systemd mount the filesystems for you if you're feeling adventurous.) Building Just do make. You're going to need docker, swapoff, tar, and dd installed. Why? 1. I'm a Nix contrarian, so naturally I wanted something to be to Docker like NixOS is to Nix. docker-boot fills this niche. 2. Injecting into init is based, I've always wanted to do that; this project is my excuse. 3. If you need to move partitions on your boot disk, you probably want to run a system off RAM. This is typically accomplished by creating a tmpfs, debootstraping an OS into it, pivot_rooting and killing services that use the real disk. That's a bit ridiculous of a manual; this project attempts to reduce the gap. About Like `execve`, but for userspace Resources Readme License WTFPL license Activity Stars 5 stars Watchers 1 watching Forks 0 forks Report repository Releases No releases published Packages 0 No packages published Languages * C 99.6% * Makefile 0.4% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.