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