1#!/usr/bin/env bash
 2
 3# Use a docker BASE_IMAGE to test building Zed.
 4# e.g: ./script/bundle-docker ubuntu:20.04
 5#
 6# Increasing resources available to podman may speed this up:
 7# podman machine stop
 8# podman machine set --memory 16384 --cpus 8 --disk-size 200
 9# podman machine start
10
11set -euo pipefail
12
13BASE_IMAGE=${BASE_IMAGE:-${1:-}}
14if [ -z "$BASE_IMAGE" ]; then
15    echo "Usage: $0 BASE_IMAGE" >&2
16    exit 1
17fi
18
19export DOCKER_BUILDKIT=1
20cd "$(dirname "$0")/.."
21
22podman build . \
23    -f Dockerfile-distros \
24    -t many \
25    --build-arg BASE_IMAGE="$BASE_IMAGE"