/alpine-make-oci

Creates an OCI compliant Alpine Linux container image.

Primary LanguageShellMIT LicenseMIT

Description

Creates an OCI compliant Alpine Linux container image.

Usage

Normal

alpine-make-oci [options] [ -- [config_flags] ]

Rootless

alpine-make-oci unshare [options] [ -- [config_flags] ]

Options

-b, --branch=<version>          Specify the Alpine branch to install.
-h, --help                      Show this message then exit.
-p, --package                   Additional package to install.
-k, --keep                      Keep image in the local repository.
-n, --name=<name>               Generated image name.
-o, --output=<path>             Save a compressed OCI bundle at the specified location.

Config Flags

Arguments to pass to buildah-config; see buildah-config(1).

Example

Generate an archived oci bundle in the current directory

$ sudo alpine-make-oci -o example.1.img

Same thing, only without root

$ alpine-make-oci unshare -o example.2.img

Add an image to the local repo that prints the contents of the root directory

$ alpine-make-oci unshare -k -n showdir -- --cmd ls

run container output

$ podman run showdir
bin
dev
etc
lib
proc
root
run
sbin
sys
tmp
usr
var

Installation

yay -S alpine-make-oci

From Source

Install dependencies

Install the script

meson build
sudo ninja -C build install