]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
CI: script for local container build
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 14 Mar 2023 11:23:50 +0000 (12:23 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sun, 26 Mar 2023 17:45:34 +0000 (12:45 -0500)
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
share/container-build.sh [new file with mode: 0755]

diff --git a/share/container-build.sh b/share/container-build.sh
new file mode 100755 (executable)
index 0000000..a4e28e4
--- /dev/null
@@ -0,0 +1,18 @@
+#! /bin/bash
+
+#
+# SPDX-FileCopyrightText:  2023, Iker Pedrosa <ipedrosa@redhat.com>
+#
+# SPDX-License-Identifier:  BSD-3-Clause
+#
+
+for FILE in share/containers/*; do
+       IFS='/'
+       read -ra ADDR <<< "$FILE"
+       IFS='.'
+       read -ra ADDR <<< "${ADDR[2]}"
+       IFS=''
+       if ! docker build -f $FILE . --output build-out/${ADDR[0]}; then
+               exit
+       fi
+done