mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2034] Option to set docker volume options from cli #977
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#977
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 testsuch 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
mountsmap.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 :)