You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run -d -p 3000:3000 --name=grafana -v /tmp/grafana-data:/var/lib/grafana grafana/grafana
203
208
```
209
+
210
+
#### Docker: Passing tokens.yaml file to the container
211
+
On starting the container, the Dockerfile will create an empty `/etc/pure-fa-om-exporter/tokens.yaml` file whether the users requires it or not. If the file is blank, the container will successfully start. If the container has a volume attached to the `/etc/pure-fa-om-exporter/` directory containing a valid `tokens.yaml` file the container will utilize the contents.
212
+
213
+
```bash
214
+
# Pure Storage OpenMetrics Exporter container with authentication tokens
215
+
docker run -d -p 9490:9490 --name pure-fa-om-exporter --volume /hostpathtofile/tokens.yaml:/etc/pure-fa-om-exporter/tokens.yaml quay.io/purestorage/pure-fa-om-exporter:<version>
216
+
```
217
+
218
+
Changes to the tokens.yaml file can be reloaded by restarting the Docker container.
219
+
220
+
```bash
221
+
docker restart pure-fa-om-exporter
222
+
```
223
+
204
224
Please have a look at the documentation of each image/application for adequate configuration examples.
Copy file name to clipboardExpand all lines: build/docker/Dockerfile
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
FROM golang:alpine as build
2
-
#version should set to development unless another build arg is passed
2
+
#version should set to development unless another build arg is passed
3
3
ARG VERSION=development
4
4
5
5
WORKDIR /usr/src/app
@@ -11,9 +11,14 @@ RUN go mod download && go mod verify
11
11
COPY . .
12
12
RUN CGO_ENABLED=1 go build -a -tags 'netgo osusergo static_build' -ldflags="-X main.version=v$VERSION" -v -o /usr/local/bin/pure-fa-om-exporter cmd/fa-om-exporter/main.go
13
13
14
+
14
15
# alpine is used here as it seems to be the minimal image that passes quay.io vulnerability scan
# create an empty tokens file for use with volumes if required. You can use a mounted volume to /etc/pure-fa-om-exporter/ to pass the `tokens.yaml` file. File must be named `tokens.yaml`.
20
+
RUN mkdir /etc/pure-fa-om-exporter && touch /etc/pure-fa-om-exporter/tokens.yaml
0 commit comments