CI: script for local container build

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Iker Pedrosa 2023-03-14 12:23:50 +01:00 committed by Serge Hallyn
parent d4f31a5b3e
commit 300d6ef45c
1 changed files with 18 additions and 0 deletions

18
share/container-build.sh Executable file
View File

@ -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