urbit/sh/image
Brendan Hay 4813d9829b
build: simplify image build interface
This removes the baked in codedump inspection and wrapper scripts
in favour of downstream tooling overriding this as necessary by
using FROM <image> in their respective dockerfile.
2019-10-22 10:18:37 +08:00

18 lines
364 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
say() {
echo "$1" >&2
}
say "Building nix/ops/image..."
nix_out="$(nix-build nix/ops -A image --no-out-link "$@")"
say "Loading $nix_out into Docker..."
nix_name="$(docker load --quiet --input $nix_out)"
nix_name="${nix_name#Loaded image: }"
# Output only the tag on stdout for subsequent pipes/tooling.
echo $nix_name