Skip to content

Instantly share code, notes, and snippets.

@amshinde
Created April 5, 2019 21:43
Show Gist options
  • Save amshinde/4ec3683fc79b910eb40c60e198a5ab92 to your computer and use it in GitHub Desktop.
Save amshinde/4ec3683fc79b910eb40c60e198a5ab92 to your computer and use it in GitHub Desktop.
Rootless podman on Ubuntu

Install podman and uidmap

sudo add-apt-repository ppa:projectatomic/ppa
sudo apt-get update
sudo apt-get install podman uidmap
echo "$(whoami):10000:65536" | sudo tee /etc/subuid
echo "$(whoami):10000:65536" | sudo tee /etc/subgid
echo -e "[registries.search]\nregistries = ['docker.io']" | sudo tee /etc/containers/registries.conf

Install slirp4netns for user neworking

slirp4netns is pacaked for Ubuntu >19.04

To install from source:

git clone https://github.com/rootless-containers/slirp4netns
cd slirp4netns/
./autogen.sh 
./configure
make
sudo make install
podman run -it --rm debian bash

Run rootless container with podman:

podman run -it debian bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment