Skip to content

Commit

Permalink
fix typos and improvement of the ssh section readability
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
  • Loading branch information
glours authored and ndeloof committed Mar 9, 2022
1 parent 40f015a commit e13d6e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.md
Expand Up @@ -163,7 +163,7 @@ args:
* `default` - let the builder connect to the ssh-agent.
* `ID=path` - a key/value definition of an ID and the associated path. Can be either a [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) file, or path to ssh-agent socket

Simple`default` sample
Simple `default` sample
```yaml
build:
context: .
Expand All @@ -174,7 +174,7 @@ or
```yaml
build:
context: .
ssh: [default] # mount the default ssh agent
ssh: ["default"] # mount the default ssh agent
```

Using a custom id `myproject` with path to a local SSH key:
Expand All @@ -185,7 +185,7 @@ build:
- myproject=~/.ssh/myproject.pem
```
Image builder can then rely on this to mount SSH key during build.
For illustration, [Buildkit extended syntax](https://github.com/compose-spec/compose-spec/pull/234/%5Bmoby/buildkit@master/frontend/dockerfile/docs/syntax.md#run---mounttypessh%5D(https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run---mounttypessh)) can be used to mount ssh key set by ID and access a secured resource:
For illustration, [BuildKit extended syntax](https://github.com/compose-spec/compose-spec/pull/234/%5Bmoby/buildkit@master/frontend/dockerfile/docs/syntax.md#run---mounttypessh%5D(https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run---mounttypessh)) can be used to mount ssh key set by ID and access a secured resource:

`RUN --mount=type=ssh,id=myproject git clone ...`

Expand Down

0 comments on commit e13d6e4

Please sign in to comment.