summaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 9ca49f06199b0b3f6d3593dbbc074de0dc44a90d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -e

cd "$(dirname "$0")"

trap 'rm -rf tmp' EXIT
rm -rf tmp

buildah bud -t rebel-rootfs --squash
buildah push rebel-rootfs dir:tmp
buildah rmi rebel-rootfs

digest="$(jq -r '.layers[0].digest' <tmp/manifest.json | cut -d: -f2)"
mv -f "tmp/$digest" rootfs.tar.gz