docs: use homedir() in the bake ssh --set example
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
@@ -508,11 +508,11 @@ $ docker buildx bake --set "*.ssh=default=$HOME/.ssh/id_ed25519,$HOME/.ssh/id_rs
|
|||||||
```
|
```
|
||||||
|
|
||||||
Your shell expands `$HOME` before buildx sees the value. The equivalent Bake
|
Your shell expands `$HOME` before buildx sees the value. The equivalent Bake
|
||||||
file definition uses the resolved paths directly (Bake doesn't expand `$HOME`
|
file definition uses the
|
||||||
in HCL strings):
|
[`homedir`](https://docs.docker.com/build/bake/stdlib/#homedir) HCL function:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
target "default" {
|
target "default" {
|
||||||
ssh = [{ id = "default", paths = ["/home/user/.ssh/id_ed25519", "/home/user/.ssh/id_rsa"] }]
|
ssh = [{ id = "default", paths = ["${homedir()}/.ssh/id_ed25519", "${homedir()}/.ssh/id_rsa"] }]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user