mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 04:56:19 +00:00
ci(crabbox): harden docker hydration
This commit is contained in:
@@ -21,7 +21,7 @@ docker_build_on_missing_enabled() {
|
||||
|
||||
docker_build_command() {
|
||||
local build_cmd=(docker build)
|
||||
if [ "${OPENCLAW_DOCKER_BUILD_USE_BUILDX:-0}" = "1" ]; then
|
||||
if [ "${OPENCLAW_DOCKER_BUILD_USE_BUILDX:-0}" = "1" ] || docker_build_args_need_buildx "$@"; then
|
||||
build_cmd=(docker buildx build --load)
|
||||
if [ -n "${OPENCLAW_DOCKER_BUILD_CACHE_FROM:-}" ]; then
|
||||
build_cmd+=(--cache-from "${OPENCLAW_DOCKER_BUILD_CACHE_FROM}")
|
||||
@@ -34,6 +34,17 @@ docker_build_command() {
|
||||
printf '%s\0' env DOCKER_BUILDKIT=1 "${build_cmd[@]}" "$@"
|
||||
}
|
||||
|
||||
docker_build_args_need_buildx() {
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--build-context | --build-context=*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
docker_build_transient_failure() {
|
||||
local log_file="$1"
|
||||
grep -Eqi \
|
||||
|
||||
Reference in New Issue
Block a user