mirror of
https://github.com/whyour/qinglong.git
synced 2026-02-12 14:05:38 +08:00
Fix DNS resolution issue in Alpine containers by adding ndots:0 option
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
41a1619c82
commit
00ca9bad1e
|
|
@ -12,6 +12,16 @@ log_with_style() {
|
|||
printf "\n[%s] [%7s] %s\n" "${timestamp}" "${level}" "${message}"
|
||||
}
|
||||
|
||||
# Fix DNS resolution issues in Alpine Linux
|
||||
# Alpine uses musl libc which has known DNS resolver issues with certain domains
|
||||
# Adding ndots:0 prevents unnecessary search domain appending
|
||||
if [ -f /etc/alpine-release ]; then
|
||||
if ! grep -q "^options ndots:0" /etc/resolv.conf 2>/dev/null; then
|
||||
echo "options ndots:0" >> /etc/resolv.conf
|
||||
log_with_style "INFO" "🔧 已配置 DNS 解析优化 (ndots:0)"
|
||||
fi
|
||||
fi
|
||||
|
||||
log_with_style "INFO" "🚀 1. 检测配置文件..."
|
||||
import_config "$@"
|
||||
fix_config
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user