Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-distrib
Commits
3fb1ee94
Commit
3fb1ee94
authored
Aug 18, 2021
by
Baptiste Mesta
Browse files
Merge branch 'master' into dev
parents
548a6060
9aecf0ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker/build.sh
View file @
3fb1ee94
...
...
@@ -16,6 +16,7 @@ exit_with_usage() {
echo
""
echo
"Options:"
echo
" -a docker_build_args_file file to read docker build arguments from"
echo
" -t tag_name tag the using using this name - by default bonitasoft/bonita:VERSION"
echo
" -c use Docker cache while building image - by default build is performed with '--no-cache=true'"
echo
""
echo
"Examples:"
...
...
@@ -43,6 +44,13 @@ while [ "$#" -gt 0 ]; do
-c
)
no_cache
=
"false"
;;
-t
)
shift
TAG_NAME
=
$1
if
[
-z
"TAG_NAME"
]
;
then
exit_with_usage
"Option -t requires an argument."
fi
;;
--
)
break
;;
...
...
@@ -94,11 +102,16 @@ else
echo
"BONITA_VERSION is passed in BUILD_ARGS parameters (
$BUILD_ARGS
), using it"
fi
IMAGE_NAME
=
bonitasoft/bonita
IMAGE_NAME_AND_BONITA_VERSION
=
${
IMAGE_NAME
}
:
${
BONITA_VERSION
}
if
[
-n
"
$TAG_NAME
"
]
;
then
IMAGE_NAME_AND_BONITA_VERSION
=
"
$TAG_NAME
"
ALL_TAGS
=
"-t
$TAG_NAME
"
else
IMAGE_NAME_AND_BONITA_VERSION
=
"bonitasoft/bonita:
${
BONITA_VERSION
}
"
ALL_TAGS
=
"-t
${
IMAGE_NAME_AND_BONITA_VERSION
}
"
fi
echo
". Building image <
${
IMAGE_NAME_AND_BONITA_VERSION
}
>"
build_cmd
=
"docker build
${
BUILD_ARGS
}
-t
${
IMAGE_NAME_AND_BONITA_VERSION
}
."
build_cmd
=
"docker build
${
BUILD_ARGS
}
${
ALL_TAGS
}
."
echo
"Running command: '
$build_cmd
'"
eval
"
$build_cmd
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment