Skip to content

Commit 74b466e

Browse files
committed
added target option
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent 3be8044 commit 74b466e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docker/build.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ print_help() {
1111
echo " --no-cuda Disable CUDA support"
1212
echo " --platform Specify the platform (default: current platform)"
1313
echo " --devel-only Build devel image only"
14+
echo " --target Specify the target image"
1415
echo ""
1516
echo "Note: The --platform option should be one of 'linux/amd64' or 'linux/arm64'."
1617
}
@@ -36,6 +37,10 @@ parse_arguments() {
3637
--devel-only)
3738
option_devel_only=true
3839
;;
40+
--target)
41+
option_target="$2"
42+
shift
43+
;;
3944
*)
4045
echo "Unknown option: $1"
4146
print_help
@@ -58,10 +63,14 @@ set_cuda_options() {
5863

5964
# Set build options
6065
set_build_options() {
61-
if [ "$option_devel_only" = "true" ]; then
62-
target="universe-devel"
66+
if [ -n "$option_target" ]; then
67+
target="$option_target"
6368
else
64-
target="universe"
69+
if [ "$option_devel_only" = "true" ]; then
70+
target="universe-devel"
71+
else
72+
target="universe"
73+
fi
6574
fi
6675
}
6776

0 commit comments

Comments
 (0)