Skip to content

Commit

Permalink
(maint) add secrets docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TP Honey authored Jul 4, 2022
1 parent 571deb9 commit a842dfe
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,46 @@ docker build \

> Notice: Be aware that the Docker plugin currently requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.
### Using Docker buildkit Secrets

```yaml
kind: pipeline
name: default

steps:
- name: build dummy docker file and publish
image: plugins/docker
pull: never
settings:
repo: tphoney/test
tags: latest
secret: id=mysecret,src=secret-file
username:
from_secret: docker_username
password:
from_secret: docker_password
```
Using a dockerfile that references the secret-file
```bash
# syntax=docker/dockerfile:1.2

FROM alpine

# shows secret from default secret location:
RUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret
```

and a secret file called secret-file

```
COOL BANANAS
```


### Running from the CLI

```console
docker run --rm \
-e PLUGIN_TAG=latest \
Expand Down Expand Up @@ -96,4 +136,4 @@ Run the changelog generator again with the future version according to semver.
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
```

Create your pull request for the release. Get it merged then tag the release.
Create your pull request for the release. Get it merged then tag the release.

0 comments on commit a842dfe

Please sign in to comment.