mirror of
https://github.com/clearlinux/docs.git
synced 2026-10-03 23:58:21 +00:00
Adding a stanza to test the config file
This testing instruction will hopefully help people in their workflow. The goal is to test the config before building a new image. I also removed the semi column and added a h2 to 'Build and run' Signed-off-by: Florentin Raud <flo@ngineered.co.uk>
This commit is contained in:
committed by
Tianon Gravi
parent
d38e8fcdd8
commit
e6b00ae7fa
+12
-1
@@ -23,10 +23,21 @@ FROM haproxy:1.5
|
||||
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
||||
```
|
||||
|
||||
Build and run:
|
||||
## Build the container
|
||||
|
||||
```console
|
||||
$ docker build -t my-haproxy .
|
||||
```
|
||||
|
||||
## Test the configuration file
|
||||
|
||||
```console
|
||||
$ docker run -it --rm --name haproxy-syntax-check haproxy:1.5 haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg
|
||||
```
|
||||
|
||||
## Run the container
|
||||
|
||||
```console
|
||||
$ docker run -d --name my-running-haproxy my-haproxy
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user