Skip to content

Commit a842dfe

Browse files
author
TP Honey
authored
(maint) add secrets docs
1 parent 571deb9 commit a842dfe

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,46 @@ docker build \
6262

6363
> Notice: Be aware that the Docker plugin currently requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.
6464
65+
### Using Docker buildkit Secrets
66+
67+
```yaml
68+
kind: pipeline
69+
name: default
70+
71+
steps:
72+
- name: build dummy docker file and publish
73+
image: plugins/docker
74+
pull: never
75+
settings:
76+
repo: tphoney/test
77+
tags: latest
78+
secret: id=mysecret,src=secret-file
79+
username:
80+
from_secret: docker_username
81+
password:
82+
from_secret: docker_password
83+
```
84+
85+
Using a dockerfile that references the secret-file
86+
87+
```bash
88+
# syntax=docker/dockerfile:1.2
89+
90+
FROM alpine
91+
92+
# shows secret from default secret location:
93+
RUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret
94+
```
95+
96+
and a secret file called secret-file
97+
98+
```
99+
COOL BANANAS
100+
```
101+
102+
103+
### Running from the CLI
104+
65105
```console
66106
docker run --rm \
67107
-e PLUGIN_TAG=latest \
@@ -96,4 +136,4 @@ Run the changelog generator again with the future version according to semver.
96136
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t <secret token> --future-release v1.0.0
97137
```
98138

99-
Create your pull request for the release. Get it merged then tag the release.
139+
Create your pull request for the release. Get it merged then tag the release.

0 commit comments

Comments
 (0)