Merge pull request #837 from crazy-max/lima-dns

docker(install): don't use local system resolver with lima and increase timeouts
This commit is contained in:
CrazyMax
2025-11-03 12:10:21 +01:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -293,18 +293,25 @@ probes:
#!/bin/bash
set -eux -o pipefail
# Don't check for docker CLI as it's not installed in the VM (only on the host)
if ! timeout 30s bash -c "until pgrep dockerd; do sleep 3; done"; then
if ! timeout 60s bash -c "until pgrep dockerd; do sleep 3; done"; then
echo >&2 "dockerd is not running"
exit 1
fi
hint: See "/var/log/cloud-init-output.log". in the guest
hostResolver:
# Don't use local system resolver
enabled: false
# hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also
# resolve inside containers, and not just inside the VM itself.
hosts:
host.docker.internal: host.lima.internal
# Use custom DNS servers instead of the host's DNS settings
dns:
- 1.1.1.1
- 1.0.0.1
portForwards:
- guestSocket: "/var/run/docker.sock"
hostSocket: "{{dockerSock}}"

View File

@@ -331,7 +331,7 @@ export class Install {
};
await core.group('Starting lima instance', async () => {
const limaStartArgs = ['start', `--name=${this.limaInstanceName}`];
const limaStartArgs = ['start', `--name=${this.limaInstanceName}`, `--timeout=15m`];
if (process.env.LIMA_START_ARGS) {
limaStartArgs.push(process.env.LIMA_START_ARGS);
}