Remove hardcoded DNS — keep host resolv.conf in rootfs
Don't overwrite the host's resolv.conf with hardcoded 8.8.8.8. The host's DNS config is already correct for both build and runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -304,8 +304,6 @@ else
|
|||||||
echo "[storage]" > /etc/containers/storage.conf
|
echo "[storage]" > /etc/containers/storage.conf
|
||||||
echo "driver = \"vfs\"" >> /etc/containers/storage.conf
|
echo "driver = \"vfs\"" >> /etc/containers/storage.conf
|
||||||
' || err "Failed to install packages in chroot"
|
' || err "Failed to install packages in chroot"
|
||||||
# Set static DNS for runtime
|
|
||||||
echo "nameserver 8.8.8.8" | sudo tee /tmp/agent-build-mnt/etc/resolv.conf > /dev/null
|
|
||||||
ok "Alpine packages installed"
|
ok "Alpine packages installed"
|
||||||
|
|
||||||
log "Installing agent script and config..."
|
log "Installing agent script and config..."
|
||||||
|
|||||||
@@ -115,11 +115,6 @@ EOF`);
|
|||||||
{ stdio: "inherit", timeout: 120_000 }
|
{ stdio: "inherit", timeout: 120_000 }
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set static DNS for runtime (replace host resolv.conf used during install)
|
|
||||||
execSync(
|
|
||||||
`echo "nameserver 8.8.8.8" | sudo tee ${ext4Mount}/etc/resolv.conf > /dev/null`
|
|
||||||
);
|
|
||||||
|
|
||||||
// Networking init script
|
// Networking init script
|
||||||
execSync(`sudo tee ${ext4Mount}/etc/init.d/networking > /dev/null << 'EOF'
|
execSync(`sudo tee ${ext4Mount}/etc/init.d/networking > /dev/null << 'EOF'
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|||||||
Reference in New Issue
Block a user