mirror of https://github.com/docker/docs.git
parent
1085883701
commit
837beda76b
|
@ -176,15 +176,15 @@ Here is an example Dockerfile using SSH in the container:
|
|||
|
||||
FROM alpine
|
||||
|
||||
# install ssh client and git
|
||||
# Install ssh client and git
|
||||
|
||||
RUN apk add --no-cache openssh-client git
|
||||
|
||||
# download public key for github.com
|
||||
# Download public key for github.com
|
||||
|
||||
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
|
||||
# clone our private repository
|
||||
# Clone private repository
|
||||
|
||||
RUN --mount=type=ssh git clone git@github.com:myorg/myproject.git myproject
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue