Minimal Arch Linux docker image with trustable, traceable & inspectable origin
This project contains a script, build-root.sh
, which uses a slightly modified Arch bootstrapping script from this project to create an Arch Linux root filesystem archive suitable for use in a Docker container.
The filesystem used in the greyltc/archlinux container on the Docker registry is an asset attached to each of the releases for this repo. Feel free to inspect it to prove to yourself that it's safe before using it in your project!
Use docker to pull the latest trustable, AUTOMATED BUILD prebuilt image:
docker pull ghcr.io/greyltc/archlinux
# from https://github.com/greyltc/docker-archlinux/pkgs/container/archlinux
or
docker pull greyltc/archlinux
# from https://hub.docker.com/r/greyltc/archlinux
You can use docker to build this container yourself.
You can fetch a docker build context from a release asset and use that to build the container.
- Build your baseline Arch Linux docker image
docker build --tag arch-localbuild https://github.com/greyltc/docker-archlinux/releases/download/v20240129.0.240/docker-archlinux-x86_64.tar.xz
- Inspect the container
docker run --interactive --tty arch-localbuild bash
You can use the scripts in this repo to build this container from scratch.
- Install dependencies
Use your favorite Linux distro's package manager to install the following commands/packages: fakechroot, fakeroot, chroot, xz, coreutils, wget, sed, gawk, tar, gzip, git, docker, bash, zstd - Clone repo
git clone https://github.com/greyltc/docker-archlinux.git cd docker-archlinux
- Make a build context
./build-root.sh x86_64 out
- Build your baseline Arch Linux docker image
docker build --tag arch-localbuild out/x86_64
- Inspect the container
docker run --interactive --tty arch-localbuild bash