Skip to content

Instantly share code, notes, and snippets.

@0xMurage
Created January 20, 2024 11:19
Show Gist options
  • Save 0xMurage/ab72c2c8dd8fd896c556f337e718738b to your computer and use it in GitHub Desktop.
Save 0xMurage/ab72c2c8dd8fd896c556f337e718738b to your computer and use it in GitHub Desktop.
Install Podman on Ubuntu 18 +

Only the following Ubuntu versions are supported using this method:

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 21.04
  • Ubuntu 21.10
  • Ubuntu 22.04

I assume all the commands will run in a sudo/privileged shell.

Requirements

  • CURL
  • GPG
  • lsb-release

Add the GPG key to validate installations

curl -fsSL "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$(lsb_release -rs)/Release.key" \
| gpg --dearmor \
|tee /etc/apt/keyrings/devel_kubic_libcontainers_stable.gpg > /dev/null

Add Open SUSE repository to the sources list

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_stable.gpg]\
    https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$(lsb_release -rs)/ /" \
  | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list > /dev/null

Update and validate the sources

apt update

Install Podman

apt install podman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment