Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lxc/distrobuilder
System container image builder for LXC and Incus
https://github.com/lxc/distrobuilder
containers images incus lxc virtual-machines
Last synced: 1 day ago
JSON representation
System container image builder for LXC and Incus
- Host: GitHub
- URL: https://github.com/lxc/distrobuilder
- Owner: lxc
- License: apache-2.0
- Created: 2018-01-24T17:13:33.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T20:07:55.000Z (16 days ago)
- Last Synced: 2024-10-24T04:19:26.492Z (16 days ago)
- Topics: containers, images, incus, lxc, virtual-machines
- Language: Go
- Homepage: https://linuxcontainers.org
- Size: 2.32 MB
- Stars: 582
- Watchers: 24
- Forks: 167
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS
Awesome Lists containing this project
- awesome-repositories - lxc/distrobuilder - System container image builder for LXC and Incus (Go)
README
# distrobuilder
System container and VM image builder for Incus and LXC.## Status
Type | Service | Status
--- | --- | ---
CI | GitHub | [![Build Status](https://github.com/lxc/distrobuilder/workflows/CI%20tests/badge.svg)](https://github.com/lxc/distrobuilder/actions)
Project status | CII Best Practices | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1728/badge)](https://bestpractices.coreinfrastructure.org/projects/1728)## Command line options
The following are the command line options of `distrobuilder`. You can use `distrobuilder` to create container images for both Incus and LXC.
```bash
$ distrobuilder
System container and VM image builder for Incus and LXCUsage:
distrobuilder [command]Available Commands:
build-dir Build plain rootfs
build-incus Build Incus image from scratch
build-lxc Build LXC image from scratch
help Help about any command
pack-incus Create Incus image from existing rootfs
pack-lxc Create LXC image from existing rootfs
repack-windows Repack Windows ISO with drivers includedFlags:
--cache-dir Cache directory
--cleanup Clean up cache directory (default true)
--debug Enable debug output
--disable-overlay Disable the use of filesystem overlays
-h, --help help for distrobuilder
-o, --options Override options (list of key=value)
-t, --timeout Timeout in seconds
--version Print version numberUse "distrobuilder [command] --help" for more information about a command.
```
## Installing from package
`distrobuilder` is available from the [Snap Store](https://snapcraft.io/distrobuilder).
```
sudo snap install distrobuilder --classic
```## Installing from source
To compile `distrobuilder` from source, first install the Go programming language, and some other dependencies.
- Debian-based:
```
sudo apt update
sudo apt install -y golang-go debootstrap rsync gpg squashfs-tools git make
```- ArchLinux-based:
```
sudo pacman -Syu
sudo pacman -S go debootstrap rsync gnupg squashfs-tools git make --needed
```- Red Hat-based:
```
sudo dnf check-update
sudo dnf install golang debootstrap rsync gnupg2 squashfs-tools git make
```NOTE: Distrobuilder requires Go 1.21 or higher, if your distribution doesn't have a recent enough version available, [get it from upstream](https://go.dev/doc/install).
Second, download the source code of the `distrobuilder` repository (this repository).
```
mkdir -p $HOME/go/src/github.com/lxc/
cd $HOME/go/src/github.com/lxc/
git clone https://github.com/lxc/distrobuilder
```Third, enter the directory with the source code of `distrobuilder` and run `make` to compile the source code. This will generate the executable program `distrobuilder`, and it will be located at `$HOME/go/bin/distrobuilder`.
```
cd ./distrobuilder
make
```Finally, you can run `distrobuilder` as follows.
```
$HOME/go/bin/distrobuilder
```You may also add the directory `$HOME/go/bin/` to your $PATH so that you do not need to run the command with the full path.
## How to use
See [How to use `distrobuilder`](doc/howto/build.md) for instructions.
## Troubleshooting
See [Troubleshoot `distrobuilder`](doc/howto/troubleshoot.md).