Skip to content

Commit

Permalink
Remove mount in the docker driver. (#2295)
Browse files Browse the repository at this point in the history
* Remove mount in the docker driver.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* lint json

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
  • Loading branch information
cyriltovena authored Jul 13, 2020
1 parent 0ace187 commit 2548d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 45 deletions.
23 changes: 9 additions & 14 deletions cmd/docker-driver/config.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
{
"description": "Loki Logging Driver",
"documentation": "https://github.com/grafana/loki",
"entrypoint": ["/bin/docker-driver"],
"entrypoint": [
"/bin/docker-driver"
],
"network": {
"type": "host"
},
"interface": {
"types": ["docker.logdriver/1.0"],
"types": [
"docker.logdriver/1.0"
],
"socket": "loki.sock"
},
"env": [
{
"name": "LOG_LEVEL",
"description": "Set log level to output for plugin logs",
"value": "info",
"settable": ["value"]
}
],
"mounts": [
{
"name": "data",
"description": "Optional external pipeline files",
"source": "",
"destination": "/data",
"type": "none",
"options": ["bind", "ro"],
"settable": ["source", "destination"]
"settable": [
"value"
]
}
]
}
31 changes: 0 additions & 31 deletions docs/clients/docker-driver/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,37 +109,6 @@ Custom labels can be added using the `loki-external-labels`,
`loki-pipeline-stage-file`, `labels`, `env`, and `env-regex` options. See the
next section for all supported options.

## Configure custom pipeline stage file

You can also use custom pipeline stage files, with `loki-pipeline-stage-file` option,
provided from outside of the Loki logging driver container by running Loki with a
mounted volume. To do so, you'll need to disable the plugin, set a volume mount
options and enable the plugin again:

```bash
docker plugin disable loki:latest
docker plugin set loki:latest data.source=/etc/pipelines
docker plugin enable loki:latest
```

In the example above the directory `/etc/pipelines` will be mounted as `/data`
inside the Loki driver container and `loki-pipeline-stage-file` option can be
passed with a custom pipeline configuration, provided there's a file
`/etc/pipelines/mypipeline.yaml` on the host machine:

```bash
docker run --log-driver=loki \
--log-opt loki-url="https://<user_id>:<password>@logs-us-west1.grafana.net/loki/api/v1/push" \
--log-opt loki-pipeline-stage-file=/data/mypipeline.yaml \
grafana/grafana
```

Available options are:

- `data.source`: the source directory the volume
- `data.destination`: the path where the directory is mounted in the container,
and is `/data` by default

## Supported log-opt options

The following are all supported options that the Loki logging driver supports:
Expand Down

0 comments on commit 2548d69

Please sign in to comment.