fix: 更新Docker构建脚本
This commit is contained in:
21
pkg/docker/linux/usr/local/etc/omc/script/run.sh
Normal file
21
pkg/docker/linux/usr/local/etc/omc/script/run.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
# set -o xtrace # Uncomment this line for debugging purposes
|
||||
|
||||
# Load OMC environment variables
|
||||
. /usr/local/etc/omc/script/omc-env.sh
|
||||
|
||||
# Parse CLI flags to pass to the 'omc' call
|
||||
args=("--config" "${BASE_DIR}/omc.conf")
|
||||
# Add flags specified via the 'CMD_EXTRA_FLAGS' environment variable
|
||||
read -r -a extra_flags <<< "$CMD_EXTRA_FLAGS"
|
||||
[[ "${#extra_flags[@]}" -gt 0 ]] && args+=("${extra_flags[@]}")
|
||||
# Add flags passed to this script
|
||||
args+=("$@")
|
||||
|
||||
exec omc "${args[@]}"
|
||||
Reference in New Issue
Block a user