Skip to content

Commit 05cb3a1

Browse files
committed
Doc for docker environment
refs #4
1 parent e080607 commit 05cb3a1

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ make install
3838
(see also check_interface --help)
3939

4040
check_interface -c public -h 192.168.0.1 -r 'FastEth' -p '$SERVICEPERFDATA$' -t $LASTSERVICECHECK$ -a
41-
41+
4242
Options;
4343
-h address of device
44-
44+
4545
-c|--community community (default public)
4646
-r|--regex interface list regexp
4747
Regex to match interfaces (important, this is a Regular Expression
@@ -122,3 +122,30 @@ Examples;
122122
If unsure of a pattern, you should test it on the command line thus;
123123

124124
check_interface -c public -h 192.168.0.1 -r 'Eth(0|2)$'
125+
126+
### Docker Build Environment
127+
128+
You can use docker for a development environment.
129+
130+
**Usage:**
131+
132+
Simple use:
133+
134+
```sh
135+
docker build -t check_interfaces .
136+
docker run --rm check_interfaces -c public -h sw1
137+
```
138+
139+
Persistent container
140+
141+
```sh
142+
docker build -t check_interfaces .
143+
docker create --name="check_sw1" check_interfaces -c public -h sw1
144+
docker start -a check_sw1
145+
```
146+
147+
Create a debug build
148+
149+
```sh
150+
docker build --build-arg target=debug -t check_interfaces .
151+
```

0 commit comments

Comments
 (0)