[GH-ISSUE #1209] provide a more comprehensive example of .actrc #668

Closed
opened 2026-03-01 21:45:23 +03:00 by kerem · 3 comments
Owner

Originally created by @shelper on GitHub (Jun 10, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1209

Details

i am trying to use act with my custom docker.sock path, how to config that in .actrc? i tried all the combination i can think of, but none worked. the documentation is not clear to me how to config it and googling does not give answer either
things i tried:

--container-daemon-socket /mnt/wsl/shared-docker/docker.sock
-b --container-daemon-socket /mnt/wsl/shared-docker/docker.sock
-b --container-daemon-socket=/mnt/wsl/shared-docker/docker.sock
-b socket=/mnt/wsl/shared-docker/docker.sock
socket=/mnt/wsl/shared-docker/docker.sock

I think it would be really helpful to provide a comprehensive .actrc example file as the configuration and the command line option seems not identical, or i might miss anything here?

Originally created by @shelper on GitHub (Jun 10, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1209 ### Details i am trying to use act with my custom docker.sock path, how to config that in .actrc? i tried all the combination i can think of, but none worked. the documentation is not clear to me how to config it and googling does not give answer either things i tried: ``` --container-daemon-socket /mnt/wsl/shared-docker/docker.sock -b --container-daemon-socket /mnt/wsl/shared-docker/docker.sock -b --container-daemon-socket=/mnt/wsl/shared-docker/docker.sock -b socket=/mnt/wsl/shared-docker/docker.sock socket=/mnt/wsl/shared-docker/docker.sock ``` I think it would be really helpful to provide a comprehensive `.actrc` example file as the configuration and the command line option seems not identical, or i might miss anything here?
kerem 2026-03-01 21:45:23 +03:00
Author
Owner

@shelper commented on GitHub (Jun 10, 2022):

well, i figured i can do this to solve my problem
export DOCKER_HOST="unix:///mnt/wsl/shared-docker/docker.sock"
but the qeustion then is: why we have this --container-daemon-socket if it does not work....

<!-- gh-comment-id:1152538884 --> @shelper commented on GitHub (Jun 10, 2022): well, i figured i can do this to solve my problem `export DOCKER_HOST="unix:///mnt/wsl/shared-docker/docker.sock"` but the qeustion then is: why we have this `--container-daemon-socket` if it does not work....
Author
Owner

@ChristopherHX commented on GitHub (Jun 10, 2022):

I hope this will help you to understand it better

DOCKER_HOST --container-daemon-socket path/to/socket --env DOCKER_HOST=path/to/socket
Act uses this environment variable to connect to non default docker sockets Act bind mounts this socket into the docker container, e.g. if you want to do docker in docker You may need this if you want to call a docker in the docker container

Act doesn't allow to configure the DOCKER_HOST env variable in a .actrc file. It would be better to add it if act may switch to yaml configs, .actrc doesn't seem to be great.

<option>
<flag> [<parameter can include spaces>]
--my-flag /path/with/ space
 --my-flag /path/with/ space 
-P ubuntu-latest=ubuntu:latest

This is correct:

--container-daemon-socket /mnt/wsl/shared-docker/docker.sock

In recent versions of act preceeding and trailing spaces are ignored on each line

<!-- gh-comment-id:1152755207 --> @ChristopherHX commented on GitHub (Jun 10, 2022): I hope this will help you to understand it better |`DOCKER_HOST`|`--container-daemon-socket path/to/socket`|`--env DOCKER_HOST=path/to/socket`| ---|---|--- |Act uses this environment variable to connect to non default docker sockets|Act bind mounts this socket into the docker container, e.g. if you want to do docker in docker|You may need this if you want to call a docker in the docker container| Act doesn't allow to configure the `DOCKER_HOST` env variable in a `.actrc` file. It would be better to add it if act may switch to yaml configs, `.actrc` doesn't seem to be great. ``` <option> <flag> [<parameter can include spaces>] --my-flag /path/with/ space --my-flag /path/with/ space -P ubuntu-latest=ubuntu:latest ``` This is correct: ``` --container-daemon-socket /mnt/wsl/shared-docker/docker.sock ``` In recent versions of act preceeding and trailing spaces are ignored on each line
Author
Owner

@github-actions[bot] commented on GitHub (Jul 11, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1179831346 --> @github-actions[bot] commented on GitHub (Jul 11, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/act#668
No description provided.