@@ -14,7 +14,7 @@ If no template file is provided, the tool has a default internal template that w
14
14
## Installation
15
15
helm-docs can be installed using [ homebrew] ( https://brew.sh/ ) :
16
16
17
- ```
17
+ ``` bash
18
18
brew install norwoodj/tap/helm-docs
19
19
```
20
20
@@ -23,13 +23,16 @@ of the tool.
23
23
24
24
To build from source in this repository:
25
25
26
- ```
26
+ ``` bash
27
27
cd cmd/helm-docs
28
28
go build
29
29
```
30
30
31
31
32
32
## Usage
33
+
34
+ ## Using binary directly
35
+
33
36
To run and generate documentation into READMEs for all helm charts within or recursively contained by a directory:
34
37
35
38
``` bash
@@ -41,6 +44,37 @@ helm-docs --dry-run # prints generated documentation to stdout rather than modif
41
44
The tool searches recursively through subdirectories of the current directory for ` Chart.yaml ` files and generates documentation
42
45
for every chart that it finds.
43
46
47
+ ## Using docker
48
+
49
+ You can mount directory with charts under ` /helm-docs ` within container.
50
+
51
+ Print generated documentation to stdout rather than modifying READMEs:
52
+
53
+ ``` bash
54
+ docker run -v " $( pwd) :/helm-docs" jnorwood/helm-docs:latest --dry-run
55
+ ```
56
+
57
+ Overwrite READMEs within mounted directory:
58
+
59
+ ``` bash
60
+ docker run -v " $( pwd) :/helm-docs" jnorwood/helm-docs:latest
61
+ ```
62
+
63
+ Notice: You may need to fix permissions to the created files.
64
+
65
+
66
+ # Building from source
67
+
68
+ Notice that you need to have build chain toolkit for given platform and golang installed.
69
+ Next you may need to export some vars to build standalone, non-linked binary for given platform and architecture:
70
+
71
+ ``` bash
72
+ export CGO_ENABLED=0 GOOS=linux GOARCH=amd64
73
+ make clean
74
+ make fmt
75
+ make test
76
+ make
77
+ ```
44
78
45
79
## Available Templates
46
80
The templates generated by the tool are shown below, and can be included in your ` README.md.gotmpl ` file like so:
0 commit comments