chore(docs): clarify the behavior of [container].docker_host #1059

Merged
earl-warren merged 2 commits from drewcassidy/runner:clarify-docker-host into main 2025-10-06 03:51:20 +00:00
Contributor

The description of container.docker_host was misleading (and IMO the setting itself does too many things, see forgejo/forgejo-actions-feature-requests#58). I clarified the comments in the example config to clearly explain that it will mount the specified socket inside the job container, and give some example values

  • other
    • PR: chore(docs): clarify the behavior of [container].docker_host
The description of `container.docker_host` was misleading (and IMO the setting itself does too many things, see forgejo/forgejo-actions-feature-requests#58). I clarified the comments in the example config to clearly explain that it will mount the specified socket inside the job container, and give some example values <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/1059): <!--number 1059 --><!--line 0 --><!--description Y2hvcmUoZG9jcyk6IGNsYXJpZnkgdGhlIGJlaGF2aW9yIG9mIGBbY29udGFpbmVyXS5kb2NrZXJfaG9zdGA=-->chore(docs): clarify the behavior of `[container].docker_host`<!--description--> <!--end release-notes-assistant-->
Clarify the behavior of container.docker_host
All checks were successful
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / validate pre-commit-hooks file (pull_request) Successful in 36s
checks / validate mocks (pull_request) Successful in 56s
checks / build and test (pull_request) Successful in 2m42s
checks / runner exec tests (pull_request) Successful in 23s
checks / runner integration tests (pull_request) Successful in 4m15s
checks / integration tests (pull_request) Successful in 10m35s
d607b52b6d
earl-warren requested changes 2025-10-05 07:38:01 +00:00
Dismissed
@ -179,2 +179,2 @@
# overrides the docker client host with the specified one.
# If "-" or "", an available docker host will automatically be found.
# Overrides the docker host set by the DOCKER_HOST environment variable, and mounts on the job container.
# If "-", no docker host will be mounted in the job container
Contributor

Is there a reason for removing "" here?

Is there a reason for removing `""` here?
Author
Contributor

Yes, I checked the code and it only checks for "-", not an empty string

if containerDaemonSocket != "-" {

Yes, I checked the code and it only checks for "-", not an empty string https://code.forgejo.org/forgejo/runner/src/commit/ba1beb08f4c774df55f3b431bf6c516384956949/act/runner/run_context.go#L144
Contributor

True but...

if cfg.Container.DockerHost == "" {
cfg.Container.DockerHost = "-"
}

isn't this setting a delight? An endless source of awe.

True but... https://code.forgejo.org/forgejo/runner/src/commit/ba1beb08f4c774df55f3b431bf6c516384956949/internal/pkg/config/config.go#L159-L161 isn't this setting a delight? An endless source of awe.
empty string does something after all!
All checks were successful
checks / validate pre-commit-hooks file (pull_request) Successful in 32s
checks / validate mocks (pull_request) Successful in 41s
checks / build and test (pull_request) Successful in 52s
checks / runner exec tests (pull_request) Successful in 25s
Integration tests for the release process / release-simulation (pull_request) Successful in 4m7s
checks / runner integration tests (pull_request) Successful in 4m17s
checks / integration tests (pull_request) Successful in 11m5s
issue-labels / release-notes (pull_request_target) Successful in 5s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 5s
cascade / forgejo (pull_request_target) Successful in 2m1s
1d3bf171e4
earl-warren changed title from Clarify the behavior of container.docker_host to chore(docs): clarify the behavior of [container].docker_host 2025-10-06 03:51:09 +00:00
earl-warren deleted branch clarify-docker-host 2025-10-06 03:51:21 +00:00
Contributor

Could you please reflect this change in the docs? 🙏 There should be a script to do that automatically but there is not.

Could you please reflect this change in the docs? 🙏 There should be a script to do that automatically but there is not.
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo/runner!1059
No description provided.