podman

How to install the latest podman on Linux without building from source?


There are 22 dependencies necessary to build podman from source on Ubuntu/Debian. Unfortunately, the apt package manager contains only the 3.4.4 version of Podman which is very much out-dated.

I would like to install the latest version of podman in an easier and a more "storage economical" way. For example, installing only the essential binaries.


Solution

  • I have found the https://github.com/mgoltzsche/podman-static repository, where the podman binaries are provided and statically linked.

    Installation steps

    Download the statically linked binaries of podman and its dependencies:

    curl -fsSL -o podman-linux-amd64.tar.gz https://github.com/mgoltzsche/podman-static/releases/latest/download/podman-linux-amd64.tar.gz
    

    Install the binaries and configuration on your host after you've inspected the archive:

    tar -xzf podman-linux-amd64.tar.gz
    sudo cp -r podman-linux-amd64/usr podman-linux-amd64/etc /
    

    Uninstallation steps

    If you are not using the podman binaries anymore, then free up the container storage with:

    sudo podman system reset
    

    After that, remove all the copied binaries:

    sudo rm -rf /etc/containers/*
    sudo rm -rf /usr/lib/systemd/system/podman*
    sudo rm -rf /usr/lib/systemd/user/podman*
    sudo rm -rf /usr/local/bin/{crun,fuse-overlayfs,fusermount3,pasta,pasta.avx2,podman,runc}
    sudo rm -rf /usr/local/lib/podman
    

    Reference: https://github.com/containers/podman/discussions/21382