OXYGENHUB
# e2189ffef8ff oxygenflow / images / tofu / build.sh
601 B · Bourne Again Shell (bash) · executable · last changed The OpenTofu image for deploy jobs 22 days ago source blame history raw
1
#!/bin/sh
2
# Build the OxygenFlow OpenTofu image and write it as a root file system
3
# tarball for `flow rootfs import`. Rebuild when OpenTofu or a pinned
4
# provider version changes (mirror.tf).
5
set -eu
6
here=$(cd "$(dirname "$0")" && pwd)
7
out=${1:-$here/oxygenflow-tofu.tar}
8
TOFU_VERSION=1.13.1
9
TOFU_SHA256=8ccbc6f8ee21d2827715f3c6e08a9b3e0209b1e62057c05067ef117e047c1a80
10
11
docker build -q -t oxygenflow-tofu \
12
    --build-arg TOFU_VERSION=$TOFU_VERSION --build-arg TOFU_SHA256=$TOFU_SHA256 "$here"
13
id=$(docker create oxygenflow-tofu)
14
docker export "$id" -o "$out"
15
docker rm "$id" >/dev/null
16
echo "$out"