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

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

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

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

gihub地址:

https://github.com/containers/buildah

 buildah---github简单记录 随笔

感性体验:

$ 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 80 "$ctr1"

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

$ chmod +x lighttpd.sh
$ sudo ./lighttpd.sh

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄