[GH-ISSUE #2034] Option to set docker volume options from cli #977

Open
opened 2026-03-01 21:47:52 +03:00 by kerem · 0 comments
Owner

Originally created by @andre15silva on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2034

Act version

act version 0.2.51

Feature description

Hi,

I would like to be able to set a size limit to the docker volumes Act creates when running a workflow.
Ideally, I would like to give Act a list of options such as the one in this command: docker volume create --driver local --opt type=tmpfs --opt o=size=100m --opt device=tmpfs --name test such that the Act would then create the required volumes with these options.

I was trying to understand your code to implement this feature, but am failing to understand where the docker volumes are initially created.
This is my current understanding, please correct me if wrong:

In the function below, you handle volume creation as needed.
The "default" volumes are defined there in the mounts map.
Furthermore, in lines 144-155 you define the mount for the working dir (or the bind if requested).
Then, this is provided to fill the config of a new container.

github.com/nektos/act@976df8bae5/pkg/runner/run_context.go (L109-L158)

However, I do not understand where the volumes are actually created (via a docker volume create command?).
Would you be able to guide me in understanding how to make this change?

Thanks a lot :)

Originally created by @andre15silva on GitHub (Oct 5, 2023). Original GitHub issue: https://github.com/nektos/act/issues/2034 ### Act version act version 0.2.51 ### Feature description Hi, I would like to be able to set a size limit to the docker volumes Act creates when running a workflow. Ideally, I would like to give Act a list of options such as the one in this command: `docker volume create --driver local --opt type=tmpfs --opt o=size=100m --opt device=tmpfs --name test` such that the Act would then create the required volumes with these options. I was trying to understand your code to implement this feature, but am failing to understand where the docker volumes are initially created. This is my current understanding, please correct me if wrong: In the function below, you handle volume creation as needed. The "default" volumes are defined there in the `mounts` map. Furthermore, in lines 144-155 you define the mount for the working dir (or the bind if requested). Then, this is provided to fill the config of a new container. https://github.com/nektos/act/blob/976df8bae51318f13b289c3dcceb719f2e983c42/pkg/runner/run_context.go#L109-L158 However, I do not understand where the volumes are actually created (via a docker volume create command?). Would you be able to guide me in understanding how to make this change? Thanks a lot :)
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#977
No description provided.