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.
Asked
Active
Viewed 2,218 times
1

Alex Barysevich
- 544
- 1
- 7
- 18
-
have you ran `apt-get update` before `apt-get install` ? – DevLounge May 10 '21 at 21:28
-
Yes, I do run apt-get update before apt-get install – Alex Barysevich May 10 '21 at 21:45
1 Answers
2
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

Speakjava
- 3,177
- 13
- 15