OXYGENHUB
# 1daca0b6bb8c oxygenflow / images / rust / build.sh
976 B · Bourne Again Shell (bash) · executable · last changed Build image for Rust and Node jobs (images/rust: toolchain, rustfmt, clippy, Node 24, vendored crates, offline cargo); flow-init finds the program in the job's PATH (glibc's execvpe used PID 1's own); network "loopback" in M0 1 month ago source blame history raw
1
#!/bin/sh
2
# Build the OxygenFlow build image and write it as a root file system
3
# tarball for `flow rootfs import`. Run from any directory; the Oxygen
4
# projects are expected next to this repository (../oxygen, ../oxygenhub).
5
# Rebuild whenever a Cargo.lock of those projects changes.
6
set -eu
7
here=$(cd "$(dirname "$0")" && pwd)
8
dev=$(cd "$here/../../.." && pwd)
9
out=${1:-$here/oxygenflow-build.tar}
10
NODE_VERSION=24.21.0
11
NODE_SHA256=fd8e59d5a511510f6a298afb548f18c7d2b1be404d8b4a27d94fbe49f56cb2d6
12
13
rm -rf "$here/vendor"
14
cargo vendor --locked --versioned-dirs \
15
    --manifest-path "$dev/oxygen/Cargo.toml" \
16
    --sync "$dev/oxygenhub/Cargo.toml" \
17
    --sync "$dev/oxygenflow/Cargo.toml" \
18
    "$here/vendor" >/dev/null
19
docker build -q -t oxygenflow-build \
20
    --build-arg NODE_VERSION=$NODE_VERSION --build-arg NODE_SHA256=$NODE_SHA256 "$here"
21
id=$(docker create oxygenflow-build)
22
docker export "$id" -o "$out"
23
docker rm "$id" >/dev/null
24
rm -rf "$here/vendor"
25
echo "$out"