Harden coredns entrypoint binary lookup
This commit is contained in:
+10
-1
@@ -10,4 +10,13 @@ log "running entrypoint"
|
||||
log "using static Corefile forwards (local-only DNS path)"
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user