Harden coredns entrypoint binary lookup

This commit is contained in:
2026-03-05 20:42:09 -05:00
parent ea3a9e4232
commit 584c991eb1
+10 -1
View File
@@ -10,4 +10,13 @@ log "running entrypoint"
log "using static Corefile forwards (local-only DNS path)" log "using static Corefile forwards (local-only DNS path)"
# Exec CoreDNS with provided arguments # Exec CoreDNS with provided arguments
exec /coredns "$@" if [ -x /coredns ]; then
exec /coredns "$@"
fi
if [ -x /usr/bin/coredns ]; then
exec /usr/bin/coredns "$@"
fi
log "ERROR: coredns binary not found in /coredns or /usr/bin/coredns"
exit 127