mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
Without this, using the pack builder fails since it cannot communicate with a root-mounted docker socket.
21 lines
338 B
Bash
Executable File
21 lines
338 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $TRACE ]] && set -x
|
|
|
|
main() {
|
|
declare desc="re-runs pack commands as sudo"
|
|
local PACK_BIN=""
|
|
if [[ -x "/usr/bin/pack" ]]; then
|
|
PACK_BIN="/usr/bin/pack"
|
|
fi
|
|
|
|
if [[ -z "$PACK_BIN" ]]; then
|
|
echo "! No pack binary found" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
sudo -E "$PACK_BIN" "$@"
|
|
}
|
|
|
|
main "$@"
|