Git Product home page Git Product logo

podman-bootc's Introduction

Streamlining podman + bootc interactions

This project aims to address containers/podman#21243 in alignment with the https://github.com/containers/bootc project.

Goals

Setup

Requirements:

  • bootc extension requirements
    • (Even on Linux, you must set up podman machine with a rootful connection; see below)
    • podman machine init --rootful && podman machine start
  • qemu-system-x86_64/qemu-system-aarch64
  • xorriso/osirrox
  • golang
  • libvirt-devel

To compile it just run in the project directory

make

On MacOS you can use homebrew to install podman-bootc

brew tap germag/podman-bootc
brew install podman-bootc

It will install xorriso and libvirt, but it doesn't install qemu. You need to install qemu manually, using brew:

brew install qemu

or by other mean and make it available in the path.

Running

The core command right now is:

podman-bootc run <imagename>

This command creates a new virtual machine, backed by a persistent disk image from a "self install" of the container image, and makes a SSH connection to it.

This requires SSH to be enabled by default in your base image; by default an automatically generated SSH key is injected via a systemd credential attached to qemu.

Even after you close the SSH connection, the machine continues to run.

Other commands:

  • podman-bootc list: List running VMs
  • podman-bootc ssh: Connect to a VM
  • podman-bootc rm: Remove a VM

Architecture

At the current time the run command uses a bootc install flow - where the container installs itself executed in a privileged mode inside the podman-machine VM.

The installation target is a raw disk image is created on the host, but loopback mounted over virtiofs/9p from the podman-machine VM.

(The need for a real-root privileged container to write Linux filesystems is part of the rationale for requiring podman-machine even on Linux is that it keeps the architecture aligned with MacOS (where it's always required))

In the future, support for installing via Anaconda and bootc-image-builder will be added.

podman-bootc's People

Contributors

germag avatar cgwalters avatar ckyrouac avatar jeckersb avatar cfergeau avatar lmilbaum avatar platform-engineering-bot 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.