Unable to locate package buildah

2.7k views Asked by At

I am trying to build Ubuntu image with a possibility to build Docker images on it. The tool that I want to use for it is buildah. However when my docker build executes the installation command: sudo apt-get -y install buildah I get this error: Unable to locate package buildah. My base image is: Zulu OpenJDK from Azul. I can clearly see that the requested package is in the central Ubuntu repo so I really do not understand why it can not find it.

1

There are 1 answers

0
Speakjava On

The problem is that the Zulu Dockerfile that you are using is based on Debian Buster (10.0), not Ubuntu. This is indicated by the first line of the file:

FROM debian:buster-slim

Looking at the buildah installation instructions on Github (https://github.com/containers/buildah/blob/master/install.md), we find that buildah is only available in the Bullseye testing branch for Debian not from the default package repo.

Edit your /etc/apt/sources.list file and append the following line:

deb http://deb.debian.org/debian testing main contrib non-free

Run sudo apt update and then you can install buildah using sudo apt-get install buildah