其他分享
首页 > 其他分享> > buildah---github简单记录

buildah---github简单记录

作者:互联网

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

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

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

gihub地址:

https://github.com/containers/buildah

感性体验:

$ 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

 

标签:github,记录,podman,标的,代替,https,buildah
来源: https://www.cnblogs.com/aguncn/p/10760580.html