> docker versionThis should return something like this:
Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:22:37 2019 OS/Arch: windows/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:29:19 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683Define your Windows imageCreate a directory where the image will be built. mkdir win-hl Copy the JAR of the CAST Highlight command line to this directory copy Highlight-Automation-Command-5.1.17.tar.gz win-hl Create a Dockerfile in the same directory and add the code below:Launch the build command as follows:
> docker build -t casthighlight/hl-agent-cli-win .You're now ready to run this image as a container and scan an application...Run the containerIn a Powersell terminal, go to the source directory you want to scan and launch this command:
> docker run --rm -v ${PWD}:c:\sourceDir -v ${PWD}:c:\workingDir casthighlight/hl-agent-cli-win --sourceDir c:\sourceDir --workingDir c:\workingDir --skipUploadThe
--rm option tells docker to remove the container once it has finished its job.
You should get the following output from the Command Line through the container:
Enjoy your scans!
For reference only. For the complete details please refer the original article
https://doc.casthighlight.com/build-windows-based-docker-image-cast-highlight-code-scans/
https://doc.casthighlight.com/build-windows-based-docker-image-cast-highlight-code-scans/
Comments