From WhiteSource Support, obtain the latest WhiteSource Docker distribution artifacts - delivered as a tar.gz or zip file:
Extract the downloaded file to an empty directory, creating the following folders:
wss-configuration: UI Configuration tool and related configuration file template
wss-deployment: Deployment template (for example, deploying the integration using Helm charts)
wss-gls-app: WhiteSource for GitLab application
wss-remediate: WhiteSource Remediate worker
wss-scanner: WhiteSource for GitLab scanner
build.sh/build.bat (Linux/Windows): The build script that will create the relevant Docker images.
Verify that the desired package managers will be installed on the wss-scanner Docker image:
The package managers installed by default are - Maven (3.5.4), npm, Bower, Yarn, Gradle, Pip, and Pip3.
If you want to scan a package manager not mentioned above, see Modifying the Scanner Dockerfile.
Build the docker images. A total of three images will be built: wss-gls-app, wss-scanner, and wss-remediate.
There are two options to build the Docker images:
Using an executable script (recommended):
Windows - Run build.bat which is located in the main folder where you extracted the agent-4-gitlab-server zip file.
Linux - Run build.sh which is located in the main folder where you extracted the agent-4-gitlab-server tar.gz file.
In order to ensure that the build succeeded, run the command docker images and check if the wss-gls-app, wss-gls-scanner, and wss-remediate images were created.
Manually building the images:
NOTE: If you selected option 4a (Using an executable script), skip this step.
To run the steps of the build file manually, run the following commands directly:
# For example: docker build -t wss-gls-app:<version> wss-gls-app/docker docker build -t wss-scanner:<version> wss-scanner/docker docker build -t wss-remediate:<version> wss-remediate/docker
Stop and remove the old containers and images:
# For example: docker rm -f wss-gls-app wss-scanner wss-remediate docker rmi wss-gls-app:<version> wss-scanner:<version> wss-remediate:<version>
Fill in the fields in WhiteSource Integrate Pageto regenerate the Activation Key:
Open a separate browser tab or window and log in to WhiteSource.
Navigate to the Integrate page of the WhiteSource application. Expand the WhiteSource for GitLab Server bar to view the following fields:
GitLab Server API URL: Your GitLab Server instance's API URL. For example: https://GitLabDevServer.com/api/v4
GitLab Webhook URL: The URL of the WhiteSource webhook handler (the same URL as the configured system hook).
GitLab Webhook Secret: The webhook secret you entered when creating the system hook (viewable when editing the system hook).
GitLab Personal Access Token: The @whitesource user's personal access token.
Run the UI configuration tool:
The UI Configuration tool enables you to configure the deployment file according to your specific configuration requirements.
Open the file index.html located inside the wss-configuration directory via a Chrome or Firefox Web browser. The WhiteSource Configuration Editor page is displayed.
Load the template JSON configuration file by clicking Choose File and selecting the file located at wss-configuration/config/prop.json. The General tab appears in the Editor.
Click the General tab and enter the Activation Key which you copied in the previous section.
To display the Proxy tab, click the Advanced Properties checkbox on the Home tab. The default value of all the parameters is empty; leave a parameter blank to disable it. The parameters in the proxy tab are the following:
Proxy Host: The HTTP proxy host.
Proxy Port: The HTTP proxy port.
Proxy Username: Proxy username (if applicable).
Proxy Password: Proxy password (if applicable).
Click Export, and save the JSON file with the name prop.json. This file will be used in the next sections.
NOTE: You can export the JSON file at any time to allow the relevant professional in your organization to configure a specific section.
Run the containers with the new prop.json:
Run the wss-gls-app app container:
docker run --name wss-gls-app --network my_bridge -p 9494:9494 -p 5678:5678 -v <path/to/config/directory>:/etc/usr/local/whitesource/conf wss-gls-app:<version> # For example: docker run --name wss-gls-app --network my_bridge -p 9494:9494 -p 5678:5678 -v c:/tmp/gls/:/etc/usr/local/whitesource/conf/ wss-gls-app:188.8.131.52
Run the wss-scanner scanner container:
docker run --name wss-scanner-gls --restart=always --network my_bridge -p 9393:9393 -v <path/to/config/directory>:/etc/usr/local/whitesource/conf/ wss-scanner:<version> # For example: docker run --name wss-scanner-gls --restart=always --network my_bridge -p 9393:9393 -v c:/tmp/gls/:/etc/usr/local/whitesource/conf/ wss-scanner:184.108.40.206
Run the wss-remediate server container:
docker run --name remediate-server --restart=always --network my_bridge -e LOG_LEVEL=debug -p 8080:8080 -v <path/to/config/directory>/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:<version> # For example: docker run --name remediate-server --restart=always --network my_bridge -e LOG_LEVEL=debug -p 8080:8080 -v c:/tmp/gls/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:19.8.1 # If port 8080 isn't available, you can use a different port by modifying the first port entry in the 'docker run' command. For example: # docker run --name remediate-server --network my_bridge -e LOG_LEVEL=debug -p 8082:8080 -v c:/tmp/gls/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:19.8.1