github里着重讲了buildah和podman的区别:

buildah对标的是dockerfile的脚本化代替执行。

podman对标的是docker命令的代替。

gihub地址:

https://github.com/containers/buildah

buildah---github简单记录-LMLPHP

感性体验:

$ cat > lighttpd.sh <<"EOF"
#!/bin/bash -x

ctr1=$(buildah from "${1:-fedora}")

## Get all updates and install our minimal httpd server
buildah run "$ctr1" -- dnf update -y
buildah run "$ctr1" -- dnf install -y lighttpd

## Include some buildtime annotations
buildah config --annotation "com.example.build.host=$(uname -n)" "$ctr1"

## Run our server and expose the port
buildah config --cmd "/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf" "$ctr1"
buildah config --port  "$ctr1"

## Commit this container to an image name
buildah commit "$ctr1" "${2:-$USER/lighttpd}"
EOF

$ chmod +x lighttpd.sh
$ sudo ./lighttpd.sh
05-04 02:48