Skip to content

Commit

Permalink
docs: more context around shm-size and ulimit usage
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Feb 14, 2024
1 parent 03edd08 commit d11b1da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/bake-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,9 @@ RUN --mount=type=secret,id=KUBECONFIG \

### `target.shm-size`

Sets the size of the shared memory allocated for build's containers when using
`RUN` instructions.

The format is `<number><unit>`. `number` must be greater than `0`. Unit is
optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g`
(gigabytes). If you omit the unit, the system uses bytes.
Expand Down Expand Up @@ -896,7 +899,8 @@ target "default" {

### `target.ulimits`

Ulimits are specified with a soft and hard limit as such:
Ulimits overrides the default ulimits of build's containers when using `RUN`
instructions and are specified with a soft and hard limit as such:
`<type>=<soft limit>[:<hard limit>]`, for example:

```hcl
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/buildx_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ $ SECRET_TOKEN=token docker buildx build --secret id=SECRET_TOKEN .

### <a name="shm-size"></a> Size of /dev/shm (--shm-size)

Sets the size of the shared memory allocated for build's containers when using
`RUN` instructions.

The format is `<number><unit>`. `number` must be greater than `0`. Unit is
optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g`
(gigabytes). If you omit the unit, the system uses bytes.
Expand Down Expand Up @@ -692,7 +695,8 @@ $ docker buildx build --ssh default=$SSH_AUTH_SOCK .

### <a name="ulimit"></a> Set ulimits (--ulimit)

`--ulimit` is specified with a soft and hard limit as such:
`--ulimit` overrides the default ulimits of build's containers when using `RUN`
instructions and are specified with a soft and hard limit as such:
`<type>=<soft limit>[:<hard limit>]`, for example:

```console
Expand Down

0 comments on commit d11b1da

Please sign in to comment.