Harden coredns entrypoint binary lookup
This commit is contained in:
@@ -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
|
||||||
|
if [ -x /coredns ]; then
|
||||||
exec /coredns "$@"
|
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