mirror of
https://github.com/openappsec/attachment.git
synced 2025-06-28 16:41:03 +03:00
Update README.md
This commit is contained in:
parent
f1938a7f0a
commit
cdc7531c41
40
README.md
40
README.md
@ -17,11 +17,11 @@ This repository will host Attachments for different platforms. The first one is
|
|||||||
|
|
||||||
|
|
||||||
## open-appsec NGINX attachment compilation instructions
|
## open-appsec NGINX attachment compilation instructions
|
||||||
*We provide an example for compilation instructions on Alpine, the attachment can be comiplied on other environments that match the environment hosting nginx, yet compilation instructions could need adjustment*
|
*We provide an example for compilation instructions on Alpine, the attachment can be complied on other environments that match the environment hosting nginx, yet compilation instructions could need adjustment*
|
||||||
|
|
||||||
The attachment can be compiled to support an existing nginx server or an nginx/ingress-nginxdocker.
|
The attachment can be compiled to support an existing nginx server or an nginx/ingress-nginxdocker.
|
||||||
|
|
||||||
Your compilation environment must contain git, docker, cmake and g++.
|
Your compilation environment must contain git, docker, cmake, and g++.
|
||||||
|
|
||||||
Before compiling, ensure the latest development versions of the following libraries:
|
Before compiling, ensure the latest development versions of the following libraries:
|
||||||
|
|
||||||
@ -33,8 +33,8 @@ Before compiling, ensure the latest development versions of the following librar
|
|||||||
* Python3
|
* Python3
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ apk update
|
apk update
|
||||||
$ apk add pcre-dev libxml2-dev zlib-dev openssl-dev geoip-dev linux-headers python3
|
apk add pcre-dev libxml2-dev zlib-dev openssl-dev geoip-dev linux-headers python3
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiling the attachment code for an existing NGINX server
|
### Compiling the attachment code for an existing NGINX server
|
||||||
@ -43,7 +43,7 @@ On your existing nginx server:
|
|||||||
1. Run command to extract nginx compilation flags to a file
|
1. Run command to extract nginx compilation flags to a file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nginx -V &> /tmp/nginx.ver
|
nginx -V &> /tmp/nginx.ver
|
||||||
```
|
```
|
||||||
On your compilation environment:
|
On your compilation environment:
|
||||||
1. Clone this repository
|
1. Clone this repository
|
||||||
@ -55,12 +55,12 @@ On your compilation environment:
|
|||||||
7. install
|
7. install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/openappsec/attachment.git
|
git clone https://github.com/openappsec/attachment.git
|
||||||
$ cd attachment
|
cd attachment
|
||||||
$ ./attachments/nginx/ngx_module/nginx_version_configuration.sh --conf /tmp/nginx.ver build_out
|
./attachments/nginx/ngx_module/nginx_version_configuration.sh --conf /tmp/nginx.ver build_out
|
||||||
$ cmake -DCMAKE_INSTALL_PREFIX=build_out .
|
cmake -DCMAKE_INSTALL_PREFIX=build_out .
|
||||||
$ make install
|
make install
|
||||||
$ make package
|
make package
|
||||||
```
|
```
|
||||||
|
|
||||||
#### NGINX plugin-associated libraries
|
#### NGINX plugin-associated libraries
|
||||||
@ -75,24 +75,6 @@ They can be found under the `lib` directory in the `<output path>` given to the
|
|||||||
`load_module /usr/lib/nginx/modules/libngx_module.so;`
|
`load_module /usr/lib/nginx/modules/libngx_module.so;`
|
||||||
4. Restart your nginx server.
|
4. Restart your nginx server.
|
||||||
|
|
||||||
### Compiling the attachment code and creating a docker image for an existing nginx/ingress-nginx docker
|
|
||||||
|
|
||||||
This step requires Docker to be installed on your compilation environment
|
|
||||||
|
|
||||||
1. Clone this repository
|
|
||||||
3. Run Configuration script with the required docker image name and tag
|
|
||||||
4. Run CMake command
|
|
||||||
5. Run make command
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ git clone https://github.com/openappsec/attachment.git
|
|
||||||
$ cd attachment
|
|
||||||
$ ./attachments/nginx/ngx_module/nginx_version_configuration.sh --docker <input docker image> build_out
|
|
||||||
$ cmake -DCMAKE_INSTALL_PREFIX=build_out -DOUTPUT_DOCKER_IMAGE=<output docker image> .
|
|
||||||
$ make install
|
|
||||||
$ make docker
|
|
||||||
```
|
|
||||||
|
|
||||||
Later on, you can push the image to your registry and use it as needed.
|
Later on, you can push the image to your registry and use it as needed.
|
||||||
|
|
||||||
For deployment on docker you can deploy it using the same docker command you used before with a regular nginx container, just make sure to add the parameter `--ipc=host`.
|
For deployment on docker you can deploy it using the same docker command you used before with a regular nginx container, just make sure to add the parameter `--ipc=host`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user