Skip to content

Commit 9e64905

Browse files
authored
Merge pull request moby#5210 from ardrabczyk/mention-all-mount-target-options
docs: mention `dst` and `destination` options too
2 parents 664c2b4 + 1900fc4 commit 9e64905

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

frontend/dockerfile/docs/reference.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -682,29 +682,29 @@ The supported mount types are:
682682
This mount type allows binding files or directories to the build container. A
683683
bind mount is read-only by default.
684684

685-
| Option | Description |
686-
| ---------------- | ------------------------------------------------------------------------------------ |
687-
| `target`[^1] | Mount path. |
688-
| `source` | Source path in the `from`. Defaults to the root of the `from`. |
689-
| `from` | Build stage or image name for the root of the source. Defaults to the build context. |
690-
| `rw`,`readwrite` | Allow writes on the mount. Written data will be discarded. |
685+
| Option | Description |
686+
| ---------------- | ------------------------------------------------------------------------------------ |
687+
| `target`, `dst`, `destination`[^1] | Mount path. |
688+
| `source` | Source path in the `from`. Defaults to the root of the `from`. |
689+
| `from` | Build stage or image name for the root of the source. Defaults to the build context. |
690+
| `rw`,`readwrite` | Allow writes on the mount. Written data will be discarded. |
691691

692692
### RUN --mount=type=cache
693693

694694
This mount type allows the build container to cache directories for compilers
695695
and package managers.
696696

697-
| Option | Description |
698-
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
699-
| `id` | Optional ID to identify separate/different caches. Defaults to value of `target`. |
700-
| `target`[^1] | Mount path. |
701-
| `ro`,`readonly` | Read-only if set. |
702-
| `sharing` | One of `shared`, `private`, or `locked`. Defaults to `shared`. A `shared` cache mount can be used concurrently by multiple writers. `private` creates a new mount if there are multiple writers. `locked` pauses the second writer until the first one releases the mount. |
703-
| `from` | Build stage to use as a base of the cache mount. Defaults to empty directory. |
704-
| `source` | Subpath in the `from` to mount. Defaults to the root of the `from`. |
705-
| `mode` | File mode for new cache directory in octal. Default `0755`. |
706-
| `uid` | User ID for new cache directory. Default `0`. |
707-
| `gid` | Group ID for new cache directory. Default `0`. |
697+
| Option | Description |
698+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
699+
| `id` | Optional ID to identify separate/different caches. Defaults to value of `target`. |
700+
| `target`, `dst`, `destination`[^1] | Mount path. |
701+
| `ro`,`readonly` | Read-only if set. |
702+
| `sharing` | One of `shared`, `private`, or `locked`. Defaults to `shared`. A `shared` cache mount can be used concurrently by multiple writers. `private` creates a new mount if there are multiple writers. `locked` pauses the second writer until the first one releases the mount. |
703+
| `from` | Build stage to use as a base of the cache mount. Defaults to empty directory. |
704+
| `source` | Subpath in the `from` to mount. Defaults to the root of the `from`. |
705+
| `mode` | File mode for new cache directory in octal. Default `0755`. |
706+
| `uid` | User ID for new cache directory. Default `0`. |
707+
| `gid` | Group ID for new cache directory. Default `0`. |
708708

709709
Contents of the cache directories persists between builder invocations without
710710
invalidating the instruction cache. Cache mounts should only be used for better
@@ -743,24 +743,24 @@ case.
743743

744744
This mount type allows mounting `tmpfs` in the build container.
745745

746-
| Option | Description |
747-
| ------------ | ----------------------------------------------------- |
748-
| `target`[^1] | Mount path. |
749-
| `size` | Specify an upper limit on the size of the filesystem. |
746+
| Option | Description |
747+
| ------------ | ----------------------------------------------------- |
748+
| `target`, `dst`, `destination`[^1] | Mount path. |
749+
| `size` | Specify an upper limit on the size of the filesystem. |
750750

751751
### RUN --mount=type=secret
752752

753753
This mount type allows the build container to access secure files such as
754754
private keys without baking them into the image.
755755

756-
| Option | Description |
757-
| ---------- | ------------------------------------------------------------------------------------------------- |
758-
| `id` | ID of the secret. Defaults to basename of the target path. |
759-
| `target` | Mount path. Defaults to `/run/secrets/` + `id`. |
760-
| `required` | If set to `true`, the instruction errors out when the secret is unavailable. Defaults to `false`. |
761-
| `mode` | File mode for secret file in octal. Default `0400`. |
762-
| `uid` | User ID for secret file. Default `0`. |
763-
| `gid` | Group ID for secret file. Default `0`. |
756+
| Option | Description |
757+
| ---------- | ------------------------------------------------------------------------------------------------- |
758+
| `id` | ID of the secret. Defaults to basename of the target path. |
759+
| `target`, `dst`, `destination` | Mount path. Defaults to `/run/secrets/` + `id`. |
760+
| `required` | If set to `true`, the instruction errors out when the secret is unavailable. Defaults to `false`. |
761+
| `mode` | File mode for secret file in octal. Default `0400`. |
762+
| `uid` | User ID for secret file. Default `0`. |
763+
| `gid` | Group ID for secret file. Default `0`. |
764764

765765
#### Example: access to S3
766766

@@ -781,14 +781,14 @@ $ docker buildx build --secret id=aws,src=$HOME/.aws/credentials .
781781
This mount type allows the build container to access SSH keys via SSH agents,
782782
with support for passphrases.
783783

784-
| Option | Description |
785-
| ---------- | ---------------------------------------------------------------------------------------------- |
786-
| `id` | ID of SSH agent socket or key. Defaults to "default". |
787-
| `target` | SSH agent socket path. Defaults to `/run/buildkit/ssh_agent.${N}`. |
788-
| `required` | If set to `true`, the instruction errors out when the key is unavailable. Defaults to `false`. |
789-
| `mode` | File mode for socket in octal. Default `0600`. |
790-
| `uid` | User ID for socket. Default `0`. |
791-
| `gid` | Group ID for socket. Default `0`. |
784+
| Option | Description |
785+
| ---------- | ---------------------------------------------------------------------------------------------- |
786+
| `id` | ID of SSH agent socket or key. Defaults to "default". |
787+
| `target`, `dst`, `destination` | SSH agent socket path. Defaults to `/run/buildkit/ssh_agent.${N}`. |
788+
| `required` | If set to `true`, the instruction errors out when the key is unavailable. Defaults to `false`. |
789+
| `mode` | File mode for socket in octal. Default `0600`. |
790+
| `uid` | User ID for socket. Default `0`. |
791+
| `gid` | Group ID for socket. Default `0`. |
792792

793793
#### Example: access to GitLab
794794

0 commit comments

Comments
 (0)