Visitar URL original
fix(docker): omit inherited daemon flags from Linux config by tdewanNvidia · Pull Request #1425 · docker/actions-toolkit · GitHub
Skip to content

fix(docker): omit inherited daemon flags from Linux config - #1425

Open
tdewanNvidia wants to merge 1 commit into
docker:mainfrom
tdewanNvidia:codex/fix-linux-daemon-config-conflicts
Open

tdewanNvidia wants to merge 1 commit into
docker:mainfrom
tdewanNvidia:codex/fix-linux-daemon-config-conflicts

Conversation

@tdewanNvidia

Copy link
Copy Markdown

On self-hosted Linux runners, Install.install() copies /etc/docker/daemon.json into the job's daemon configuration and also supplies --host, --data-root, --exec-root, and --pidfile. A host configuration containing any of those options makes dockerd refuse to start because the option appears both in the file and on the command line. For example, a host {"data-root":"/data/docker"} prevents rootless Docker from starting.

Remove those four inherited options from the per-job copy before merging the explicitly supplied daemonConfig. Preserve other host settings, including registry mirrors, and leave the host file unchanged. The command-line flags continue to own the isolated daemon paths. Explicit caller configuration retains its existing merge behavior.

Validation:

  • Added regressions exercise the public install() API with synthetic host configuration for rootless and ordinary Linux Docker. Both fail before the fix and pass after it, checking the emitted daemon JSON and per-job data directory.
  • yarn test __tests__/docker/install-config.test.ts: 2 passed (invoked through the installed Vitest binary).
  • yarn lint: passed (invoked through the installed ESLint binary).
  • yarn build: passed (invoked through the installed TypeScript compiler).
  • git diff --check: passed.
  • Full Docker Bake and live-daemon integration suites were not run locally. The regression stubs process startup and Docker calls; it does not claim to start a real daemon.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant