agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/devops/podman/SKILL.md

podman

Skill15 starsChanged 43 days agoMITView on GitHub

Expert Podman container engine assistance covering rootless containers, podman-compose, pod generation (Kubernetes YAML), and systemd integration. Use when managing secure, daemonless OCI containers on Linux.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Podman Quadlet or systemd service generation:

    line 97
  2. Very specific:

    Run containers rootless (--userns=keep-id) to neutralize container breakout risks.

    line 115
  3. Very specific:

    Use podman generate kube to prototype Kubernetes pod manifests locally.

    line 117
  4. Very specific:

    Run containers with --privileged unless strictly managing bare-metal kernel hardware.

    line 122
  5. Very specific:

    Leave orphaned storage layers.

    line 124

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Podman

Podman is a daemonless, rootless container engine for developing, running, and managing OCI containers and pods, functioning as a secure drop-in alternative to Docker.

When to Use

  • Rootless & Daemonless Containerization: Running OCI containers without requiring root privileges or background daemons.
  • Drop-in Docker CLI Replacement: 100% command-line compatible alias (alias docker=podman) with enhanced security.
  • Podman Pods for Kubernetes Prototyping: Grouping containers into shared network pods locally before deploying to Kubernetes.
  • Systemd Integration via Quadlets: Running production containers managed natively by Linux systemd service managers.

Quick Start

# Run a container (Rootless)
podman run -dt -p 8080:80 nginx

# Generate K8s YAML
podman kube generate my-container > pod.yaml

# Run K8s YAML locally
podman kube play pod.yaml

Core Concepts

Rootless Pod Architecture & Container Execution

Running containers without root privileges or central daemons:

# Run rootless container using user namespace mapping
podman run -d \
  --name web-app \
  -p 8080:8080 \
  --userns=keep-id \
  --security-opt no-new-privileges \
  registry.example.com/app:v1.0

# Group containers into a shared-namespace Pod (mirrors Kubernetes Pod)
podman pod create --name microservice-pod -p 3000:3000
podman run -d --pod microservice-pod --name api-service my-api:latest
podman run -d --pod microservice-pod --name redis-cache redis:alpine

Systemd Integration with Podman Quadlets

Managing containers as native systemd services:

# ~/.config/containers/systemd/api-service.container
[Unit]
Description=Production API Microservice
After=network-online.target

[Container]
Image=registry.example.com/api-service:v2.1.0
ContainerName=api-service
PublishPort=8080:8080
Environment=NODE_ENV=production
UserNS=auto

[Service]
Restart=always

[Install]
WantedBy=default.target
# Reload systemd to generate service and start container
systemctl --user daemon-reload
systemctl --user start api-service

Exporting Pods to Kubernetes YAML

Generating native Kubernetes manifests directly from local Podman pods:

# Generate Kubernetes Deployment and Service YAML
podman generate kube microservice-pod > k8s-deployment.yaml

Common Patterns

Generate Systemd Service for Rootless Container Autostart

Problem: Containers on bare-metal servers must start automatically on host boot without Docker daemon.

Solution: Use Podman Quadlet or systemd service generation:

# Run rootless container
podman run -d --name web-api -p 8080:8080 myorg/api:latest

# Generate systemd unit file
podman generate systemd --new --name web-api > ~/.config/systemd/user/container-web-api.service

# Enable user systemd service to start on boot
systemctl --user enable --now container-web-api.service
loginctl enable-linger $USER

Best Practices

Do:

  • Run containers rootless (--userns=keep-id) to neutralize container breakout risks.
  • Manage production containers on Linux servers using Podman Quadlets (.container systemd files).
  • Use podman generate kube to prototype Kubernetes pod manifests locally.
  • Configure registries.conf with explicit, secure container registry search paths.

Don't:

  • Run containers with --privileged unless strictly managing bare-metal kernel hardware.
  • Assume ports < 1024 are accessible rootless; use ports >= 1024 (e.g. 8080, 8443) or adjust sysctl.
  • Leave orphaned storage layers; clean up periodically with podman system prune.

Troubleshooting

ErrorCauseSolution
Error: rootless users cannot bind to ports < 1024Linux non-privileged port binding restriction.Run on port >1024 (e.g. 8080) or set sysctl net.ipv4.ip_unprivileged_port_start=80.
Error: short-name "..." did not expand to any registryPodman requires fully qualified registry domains by default.Use docker.io/library/nginx:latest or configure registries.conf.
Subuid/subgid range missing for userUser lacks subuid mappings for rootless namespaces.Add entry in /etc/subuid and /etc/subgid with usermod --add-subuids 100000-165535 $USER.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.