fix: install all builder binaries in Dokku docker image

Closes #7375
This commit is contained in:
Jose Diaz-Gonzalez committed 2025-03-09 17:22:53 -04:00
1 parent d52eb382b8
commit 16ff43de75
4 files changed
+51 -5

No files matched your search

+1 -1
View File
@@ -1 +1 @@
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/pack
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/lambda-builder,/usr/bin/nixpacks,/usr/bin/pack
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs lambda-builder commands as sudo"
local LAMBDA_BUILDER_BIN=""
if [[ -x "/usr/bin/lambda-builder" ]]; then
LAMBDA_BUILDER_BIN="/usr/bin/lambda-builder"
fi
if [[ -z "$LAMBDA_BUILDER_BIN" ]]; then
echo "! No lambda-builder binary found" 1>&2
exit 1
fi
sudo -E "$LAMBDA_BUILDER_BIN" "$@"
}
main "$@"
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs nixpacks commands as sudo"
local NIXPACKS_BIN=""
if [[ -x "/usr/bin/nixpacks" ]]; then
NIXPACKS_BIN="/usr/bin/nixpacks"
fi
if [[ -z "$NIXPACKS_BIN" ]]; then
echo "! No nixpacks binary found" 1>&2
exit 1
fi
sudo -E "$NIXPACKS_BIN" "$@"
}
main "$@"