Today, in this article, we show how to install Buildah OCI on Ubuntu 20.04/22.04 LTS. An open source Linux-based tool called Buildah is used to build Open Container Initiative (OCI) compliant containers, which are also compatible with Docker and Kubernetes. With Buildah, you can generate effective container images from scratch or from an existing base image using your preferred tools and an empty image. It is a more adaptable and secure method of creating container images.
Buildah was developed in 2017 by Daniel Walsh and his team at Red Hat and is named after the word “builder” spoken in a Boston accent. To build OCI and Docker compliant container images, they decided to develop a “coreutils” for container images – a tool that could be used in conjunction with existing container host tools.
With or without the help of a container daemon like Docker, these images can be kept in container registries and used in various runtime environments (which requires root access privileges and the resulting containers depend on the daemon’s functionality in yes). We have mentioned below the steps to install Buildah OCI on Ubuntu 20.04/22.04 LTS.
Steps to Install Buildah OCI on Ubuntu 20.04/22.04 LTS
Step 1: Update Ubuntu
sudo apt update && sudo apt upgrade
Step 2: Install Ramp up on Ubuntu 20.04 or 22.04
sudo apt install buildah
buildah -v
Step 3: create a container using Buildah
almalinux buildah
buildah run update dnf almalinux-working-container
buildah run almalinux-working-container dnf install httpd -y
buildah config –entrypoint “/usr/sbin/httpd -DFOREGROUND” almalinux-working-container
Step 4: create an image
buildah commit almalinux-working-container myfirstimage
Step 5: Run the image created by Buildah using Podamn or Docker
podman pictures
Step 6: create and run a container with the image
podman create –name demo myfirstimage
initial podman demo
podman exec -it demo /bin/bash
Final Words
We hope you like our article about how to install Buildah OCI on Ubuntu 20.04 or 22.04 LTS. The OCI Buildah Compliant Image Building Tool uses a coreutils interface at a lower level. Buildah is similar to Podman in that it doesn’t rely on a daemon like Docker or CRI-O and doesn’t need root access. A command-line program called Buildah duplicates all the commands present in a Dockerfile.