summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..9ca49f0
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,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