blob: 8a26c2a268ee0c422dd5d69be4f4d86e2335c200 [file] [log] [blame]
Felix Singerfca7fd22023-12-01 10:22:30 +01001#!/usr/bin/env sh
2
3IMAGE_DIR="$1"
4IMAGE_TYPE="$2"
5
6if [ -z "${IMAGE_DIR}" ] || [ -z "${IMAGE_TYPE}" ]; then
7 echo "Usage: $0 <directory> <type>"
8 echo "Missing parameters. Exit."
9 exit 1
10fi
11
12case "${IMAGE_TYPE}" in
13base)
14 ;;
15toolchain)
16 ;;
17jenkins)
18 ;;
19*)
20 echo "No valid image type given. Exit."
21 exit 1
22 ;;
23esac
24
25docker build \
26 --no-cache \
27 --tag coreboot/coreboot-sdk-${IMAGE_DIR}-${IMAGE_TYPE}:latest \
28 -f ${IMAGE_DIR}/Dockerfile.${IMAGE_TYPE} \
29 ./${IMAGE_DIR}