Buildah
ビルド
buildah build -t my-registry.example.org:5000/repo/app:latest .
Containerfile指定
buildah build -f path/to/Containerfile -t my-registry.example.org:5000/repo/app:latest .
push
docker pushなどと同じ構文
buildah push my-registry.example.org:5000/repo/image:latest
src dst形式でも実行できるため、ビルド時にFQDNを付けていなくても直接pushできる。
buildah push localhost/image:latest my-registry.example.org:5000/repo/image:latest
dind
DockerコンテナとしてデプロイしたBuildahコンテナ内でビルドするには、--privilegedオプション付与して起動する。
docker run --name buildah -d --rm --privileged quay.io/buildah/stable:latest ...
無い場合はエラーになる。
sh-5.3# buildah build -t test .
Error during unshare(CLONE_NEWUSER): Operation not permitted
ERRO[0000] parsing PID "": strconv.Atoi: parsing "": invalid syntax
ERRO[0000] (Unable to determine exit status)