summaryrefslogtreecommitdiffstats
path: root/util/docker/build.sh
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2023-12-01 10:22:30 +0100
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2023-12-06 18:44:38 +0000
commitfca7fd2a7367f27f45d9b784719f984a1128b758 (patch)
tree168df4fb15cafab25c82dff6e140e933292b5427 /util/docker/build.sh
parent30138b336145bfd88104ef226b830650e51dead6 (diff)
downloadcoreboot-fca7fd2a7367f27f45d9b784719f984a1128b758.tar.gz
coreboot-fca7fd2a7367f27f45d9b784719f984a1128b758.tar.bz2
coreboot-fca7fd2a7367f27f45d9b784719f984a1128b758.zip
util/docker: Add build script
Integration for additional container images might be added to the Makefile at some later point. However, in order to build and test new images just add a simple script which fulfills that requirement until then. Change-Id: Ibd0a6d59f395e074c784452849650d7f03b4f1d8 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79361 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/docker/build.sh')
-rwxr-xr-xutil/docker/build.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/util/docker/build.sh b/util/docker/build.sh
new file mode 100755
index 000000000000..8a26c2a268ee
--- /dev/null
+++ b/util/docker/build.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env sh
+
+IMAGE_DIR="$1"
+IMAGE_TYPE="$2"
+
+if [ -z "${IMAGE_DIR}" ] || [ -z "${IMAGE_TYPE}" ]; then
+ echo "Usage: $0 <directory> <type>"
+ echo "Missing parameters. Exit."
+ exit 1
+fi
+
+case "${IMAGE_TYPE}" in
+base)
+ ;;
+toolchain)
+ ;;
+jenkins)
+ ;;
+*)
+ echo "No valid image type given. Exit."
+ exit 1
+ ;;
+esac
+
+docker build \
+ --no-cache \
+ --tag coreboot/coreboot-sdk-${IMAGE_DIR}-${IMAGE_TYPE}:latest \
+ -f ${IMAGE_DIR}/Dockerfile.${IMAGE_TYPE} \
+ ./${IMAGE_DIR}