CxSAST Reporting Client API Installation (Docker image)
Following is a step-by-step guide for installing the CxSAST Reporting Client API component as a Docker image.
Note
This is a Linux-based image.
Installation steps
Notice
Dependency Requirements:
The Authorization Setup Script must be executed before the Client API Installation. The script and guide can be found at CxSAST Reporting Authorization Setup.
Download the CxSASTReportingAPI Docker image.
Load the CxSASTReportingAPI Docker image into your desired host Docker.
docker image load --input <image filename>.tarConfigure the CxSASTReporting settings using:
o Docker .env file
o Environment variables
Docker .env file
The image provided receives multiple parameters via environment variables. To pass them to the container, create a
.envfile with key-value pairs using the following format:KEY=valueThis file is then passed in the docker run command with the following option:
--env-file="<path to file>\vars.env"The provided
.envfile must be the same as that provided toCxSASTReportingManager. For more information, refer to CxSASTReporting Manager Installation Guide (Docker image).Environment variables
CONNECTION_STRINGRequired - Database connection string to a SQL Server.REPORTS_OUTPUT_PATHRequired - Output path for the generated reports.
To start the CxSASTReporting container, run the docker image with the following command:
docker run -p 5001:80 ` --env-file=<vars.env file path> ` -v ~/cx-reporting-service:/app/CxReports ` --restart always ` cx-reporting-service-client:latest
To startup the CxSASTReporting container, on version 5.x run the docker image with the following command:
docker run -p 5001:8080 ` --env-file=<vars.env file path> ` -v ~/cx-reporting-service:/app/CxReports ` --restart always ` cx-reporting-service-client:latest
You can verify that the installation was successful by checking
<ip>:<port>/swagger/. This will provide the familiar Swagger interface with all the available endpoints listed.
Note
If you intend to deploy the Manager and Client API images using docker-compose, please refer to CxSAST Reporting Service Docker Compose Setup.