23 lines
493 B
Bash
23 lines
493 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
log() {
|
|
# send messages to stderr so Docker logs capture them even if stdout is used by CoreDNS
|
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >&2
|
|
}
|
|
|
|
log "running entrypoint"
|
|
log "using static Corefile forwards (local-only DNS path)"
|
|
|
|
# Exec CoreDNS with provided arguments
|
|
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
|