Artifactory Repository - install and configure using Docker
Follow the instructions on this page to set up Artifactory Repository with Snyk Broker. This integration is useful to ensure a secure connection with your on-premise Artifactory Repository deployment.
Obtain Broker token for Artifactory Repository setup
Go to settings
> Integrations > Package Repositories > Artifactory.
Enter the URL of your Artifactory instance, this must end with /artifactory.
Enter your username and password.
Select Save.

When you have permissions to add a private registry, continue with the instructions to generate a Broker token from the Web UI.
Generate a Broker token from the Web UI
In the Artifactory integration settings, move the Snyk Broker on/off switch to on to display a form for generating a Broker token.
Select Generate and Save.
Copy the token that was generated to use when you set up the Broker Client.
Configure Broker to be used for Artifactory Registry
To use the Broker client with an Artifactory Registry deployment, run docker pull snyk/broker:artifactory
. Refer to Artifactory Repository - environment variables for Snyk Broker for definitions of the environment variables.
Docker run commands to set up a Broker Client for Artifactory Repository
Copy the following command to set up a fully configured Broker Client to use with Artifactory Registry. You can run the Docker container by providing the relevant configuration:
docker run --restart=always \
-p 8000:8000 \
-e BROKER_TOKEN=secret-broker-token \
-e ARTIFACTORY_URL=<yourdomain>.artifactory.com/artifactory \
snyk/broker:artifactory
For an npm or Yarn integration, use the following command.
docker run --restart=always \
-p 8000:8000 \
-e BROKER_TOKEN=secret-broker-token \
-e ARTIFACTORY_URL=acme.com/artifactory \
-e RES_BODY_URL_SUB=http://acme.com/artifactory \
snyk/broker:artifactory
As an alternative to using the Docker run command, you can use a derived Docker image to set up the Broker Client integration. See Derived Docker images for the environment variables to override for the Artifactory integration.
Start the Broker Client container and verify the connection with Artifactory Repository
Paste the Broker Client configuration to start the Broker Client container.
You can check the status of the connection by refreshing the Artifactory Integration Settings page. When the connection is set up correctly, there is no connection error.
Last updated
Was this helpful?