Skip to content

Instantly share code, notes, and snippets.

@cardboardcode
Last active July 15, 2026 03:19
Show Gist options
  • Select an option

  • Save cardboardcode/be5088b02953fe501303099af75fe1d4 to your computer and use it in GitHub Desktop.

Select an option

Save cardboardcode/be5088b02953fe501303099af75fe1d4 to your computer and use it in GitHub Desktop.
For People In A Hurry: How To Install Podman on RaspberryPi (but still use it as Docker)
c1c59263-e278-480e-a11a-7d37cb57635a

Note

This guide provides a copy-paste-observe list of quick instructional steps to install Podman instantly on a RaspberryPi, assuming it has a Linux-based operating system on it.

Note

Verified on RaspberryPi 4B.

Warning

  1. Podman does not run a daemon like Docker so --restart docker syntax does not work.
    • Workaround is to manually create a daemon service for each podman container. See below.
  2. Podman typically runs rootless so you can mount rootful directories similar to Docker.

Instructions πŸ“˜

sudo apt-get update && sudo apt install --no-install-recommends -y podman
sudo apt install -y slirp4netns uidmap fuse-overlayfs
sudo usermod --add-subuids 100000-165535 $(whoami)
sudo usermod --add-subgids 100000-165535 $(whoami)

Create user-level container configuration and use fuse-overlayfs for better performance on SD cards.

mkdir -p ~/.config/containers
cat > ~/.config/containers/storage.conf <<EOF
[storage]
driver = "overlay"

[storage.options.overlay]
mount_program = "/usr/bin/fuse-overlayfs"
EOF
sudo apt-get update && sudo apt-get install podman-docker -y

Verify βœ”οΈ

Run docker ps below and you should see something similar below in your terminal:

CONTAINER ID   IMAGE                                COMMAND                  CREATED        STATUS                    PORTS                                                   NAMES
docker run --rm docker.io/library/hello-world

Reference(s) πŸ“š

@cardboardcode

cardboardcode commented Jul 15, 2026

Copy link
Copy Markdown
Author

Workaround: Auto-Starting Containers on Boot πŸ”§ ⌚

1. Create a stopped container for systemd to use as a template

podman create \
  --name pi-web \
  -p 8080:80 \
  -v ~/my-website:/usr/share/nginx/html:ro \
  docker.io/library/nginx:alpine

2. Generate a systemd service for the container

mkdir -p ~/.config/systemd/user
podman generate systemd --new --name pi-web > ~/.config/systemd/user/container-pi-web.service

3. Enable service

systemctl --user daemon-reload
systemctl --user enable container-pi-web.service

4. Enable lingering for the pi user

sudo loginctl enable-linger $(whoami)

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