forked from Ivasoft/drone-docker
(maint) add secrets docs
This commit is contained in:
42
README.md
42
README.md
@@ -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.
|
> 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
|
```console
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e PLUGIN_TAG=latest \
|
-e PLUGIN_TAG=latest \
|
||||||
@@ -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
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user