


Each level overrides the next, and 1 is highest. There are different values you can use to configure Contrast agents. Or add it into a new Dockerfile that uses your application’s image as a base image.Use the same npm install command to add the agent into your existing Dockerfile.If option 1 doesn’t work or you prefer to maintain separate images for the application-with and without the Contrast agent-you can add the Contrast agent at container build time.


Add the Contrast agent to the application.You can instrument OWASP Juice Shop through Docker and see security data for this application in Contrast using the source code samples section at the end of this guide. It’s a good way to learn before proceeding with your own applications. There is also a lab section that describes how to instrument a sample Node application with known vulnerabilities called OWASP Juice Shop. The main portion of the guide details the most popular methods customers use to instrument Node applications contained in Docker and see security data in Contrast. We encourage you to take this guide, make it your own, and distribute it to teams who both need to instrument Node applications and manage them through Docker. This guide offers examples for using Contrast Security’s Node.js agent with Docker.
