mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
chore(webfuse): add debugging configurations and launch support (#21)
* fixes verbosity option when set through command line * adds support for build type and allows to run gdb in container * adds missing toolchain headers to project * renames container macros * adds gdbserver * fixes verbosity option when set through command line * adds support for build type and allows to run gdb in container * adds missing toolchain headers to project * renames container macros * adds gdbserver * removes language settings, which contains alternating values * adds wrapper script to launch gdbserver * fix docker command in wrapper script * fixes run in dind setup * replaces docker's init through dump-init
This commit is contained in:
36
build/run_image.template
Normal file
36
build/run_image.template
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT_ROOT="${PROJECT_ROOT:-%PROJECT_ROOT%}"
|
||||
|
||||
DOCKER="${DOCKER:-%DOCKER%}"
|
||||
IMAGE="${IMAGE:-%IMAGE%}"
|
||||
NETWORK="${NETWORK:-host}"
|
||||
HOST_CONTAINER="${HOST_CONTAINER:-"$("$PROJECT_ROOT/build/get_container_id.sh")"}"
|
||||
|
||||
# shellcheck disable=SC2162
|
||||
read -a ADDITIONAL_RUNFLAGS <<< "$RUNFLAGS"
|
||||
|
||||
RUNFLAGS=()
|
||||
|
||||
# shellcheck disable=SC2191
|
||||
RUNFLAGS+=( %RUNFLAGS% )
|
||||
|
||||
if [[ -n "$HOST_CONTAINER" ]]; then
|
||||
RUNFLAGS+=( --volumes-from "$HOST_CONTAINER" )
|
||||
fi
|
||||
|
||||
RUNFLAGS+=( --network "$NETWORK" )
|
||||
|
||||
if [[ -n "$CONTAINER_CGROUP_PARENT" ]]; then
|
||||
RUNFLAGS+=( --cgroup-parent "$CONTAINER_CGROUP_PARENT" )
|
||||
fi
|
||||
|
||||
RUNFLAGS+=( --workdir "$PWD" )
|
||||
|
||||
RUNCMD=( %RUNCMD% )
|
||||
|
||||
set -- "${RUNFLAGS[@]}" "${ADDITIONAL_RUNFLAGS[@]}" "$IMAGE" "${RUNCMD[@]}" "$@"
|
||||
|
||||
exec "$DOCKER" run "$@"
|
||||
Reference in New Issue
Block a user