Skip to content

Instantly share code, notes, and snippets.

@HariSekhon
Created March 22, 2024 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HariSekhon/77cb67c0ccad0824f0ab94dcc37130bc to your computer and use it in GitHub Desktop.
Save HariSekhon/77cb67c0ccad0824f0ab94dcc37130bc to your computer and use it in GitHub Desktop.
podman.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowlege-Base

Podman & Buildah by Redhat

Podman

  • manages containers without a daemon
  • non-root daemonless drop-in replacement for Docker
  • drop in replacement for Docker CLI command
yum install -y podman
podman <docker_command_args>
podman pull registry.access.redhat.com/ubi8/ubi
podman pull registry.access.redhat.com/ubi8/ubi-minimal
podman pull registry.access.redhat.com/ubi8/ubi-init
podman pull registry.access.redhat.com/ubi7/ubi
podman pull registry.access.redhat.com/ubi7/ubi-minimal
podman pull registry.access.redhat.com/ubi7/ubi-init

Use podman daemon as a Docker replacement:

sudo systemctl enable --now podman.socket
mkdir -p /etc/containers/containers.conf.d
echo 'service_timeout=0' > /etc/containers/containers.conf.d/timeout.conf
sudo ln -s /run/podman/podman.sock /var/run/docker.sock

or rootless:

systemctl --user enable --now podman.socket
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
export DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock

Buildah

https://github.com/containers/buildah

Buildah builds OCI images from files without Docker daemon:

  • without needing package manager in the image
  • can use Dockerfiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment