. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update -qq
sudo apt-get -qq -y install buildah
``
-
-
Save sebastianwebber/2c1e9c7df97e05479f22a0d13c00aeca to your computer and use it in GitHub Desktop.
For anyone still stuck with this, this works. ๐ https://fabianlee.org/2022/08/02/buildah-installing-buildah-and-podman-on-ubuntu-20-04/
This works for me with Ubuntu 20.04 in Azure. I am using this to update the Azure DevOps agents because I am using buildah in the pipelines.
However, every now and then I get:
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process NNNN (apt-get)
On the install
command, as it seems the update
command leaves something in background and returns control before finishing... That is not very nice for unattended scripts.
For anyone still stuck with this, this works. ๐ https://fabianlee.org/2022/08/02/buildah-installing-buildah-and-podman-on-ubuntu-20-04/
Worked for me, thank you.
Also I'm pasting same instructions just in case something happens to the site hosting them
# prereq packages
sudo apt-get update
sudo apt-get install -y wget ca-certificates gnupg2
# add repo and signing key
VERSION_ID=$(lsb_release -r | cut -f2)
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-stable.list
curl -Ls https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_$VERSION_ID/Release.key | sudo apt-key add -
sudo apt-get update
# install buildah and podman
sudo apt install buildah podman -y
# fix known issue 11745 with [machine] entry
sudo sed -i 's/^\[machine\]$/#\[machine\]/' /usr/share/containers/containers.conf
@theJaxon thanks your answer works for me
@dogukancagatay Your instructions worked for me but only after a few adjustments. For instance, I was missing
runc
anduidmap
(which wasn't necessary for installation but e.g. forbuildah login
, cf. this comment in theskopeo
repo). I also installed them viaapt
. Maybe you could add them to the list of dependencies. Also your approach withgoenv
didn't work for me at first, so I simply installedgo
following the instructions here. I encountered an error in themake
command which I fixed loosely following this article.Except for the
runc
dependency I wouldn't suggest changing your instructions though, but maybe if someone encounters the same problems as me in the future these resources will help.