Construct the dev and prod containers directly in the set

This commit is contained in:
Omar Brikaa 2022-02-19 14:40:32 +02:00
parent a9952072c1
commit c2bc1ebf94
2 changed files with 13 additions and 14 deletions

2
piston
View file

@ -13,7 +13,7 @@ SUBCOMMAND="$1"
shift
build_base() {
container_flake_key=$([[ $1 == "dev" ]] && echo "devContainer" || echo "prodContainer")
container_flake_key=$([[ $1 == "dev" ]] && echo "containers.dev" || echo "containers.prod")
CONTAINER_PATH="$(nix build ".#$container_flake_key" --no-link --json | jq '.[0].outputs.out' -r)"
echo "The image archive was created at: $CONTAINER_PATH"
docker load -i $CONTAINER_PATH || exit 1