feat(kit): establish sandbox build script
This commit is contained in:
27
build-sbx.sh
Executable file
27
build-sbx.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Build and optionally configure a Docker sandbox interactively.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
readonly KIT_PATH="$HOME/.sbx/kits/hypoport.ai"
|
||||||
|
readonly TEMPLATE='127.0.0.1:62735/finmas.de/mux033/opencode-ops:latest'
|
||||||
|
|
||||||
|
require_command() {
|
||||||
|
local command_name="$1"
|
||||||
|
local message="$2"
|
||||||
|
|
||||||
|
if ! command -v "$command_name" >/dev/null 2>&1; then
|
||||||
|
printf '%s\n' "$message" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
require_command sbx 'We cannot build a Docker sbx image because sbx does not seem to be installed.'
|
||||||
|
require_command jq 'We cannot list existing Docker sbx sandboxes because jq does not seem to be installed.'
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
Reference in New Issue
Block a user