bake: ulimits support

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-02-05 15:15:55 +01:00
parent c2befc0c12
commit 64e2b2532a
6 changed files with 89 additions and 0 deletions

View File

@ -237,6 +237,7 @@ The following table shows the complete list of attributes that you can assign to
| [`ssh`](#targetssh) | List | SSH agent sockets or keys to expose to the build |
| [`tags`](#targettags) | List | Image names and tags |
| [`target`](#targettarget) | String | Target build stage |
| [`ulimits`](#targetulimits) | List | Ulimit options |
### `target.args`
@ -893,6 +894,25 @@ target "default" {
}
```
### `target.ulimits`
Ulimits are specified with a soft and hard limit as such:
`<type>=<soft limit>[:<hard limit>]`, for example:
```hcl
target "app" {
ulimits = [
"nofile=1024:1024"
]
}
```
> **Note**
>
> If you do not provide a `hard limit`, the `soft limit` is used
> for both values. If no `ulimits` are set, they are inherited from
> the default `ulimits` set on the daemon.
## Group
Groups allow you to invoke multiple builds (targets) at once.