User-defined custom images
Context for user-defined custom images
Compatibility in the BitBucket Pipeline integration is limited to environments supported by the Docker container the integration runs in. Before v1.0.0, this was limited to environments supported by the Snyk CLI Docker Images.
Using custom images allows you to:
Extend support to newer versions of languages and frameworks not available in Bitbucket Pipelines versions < 1.0.0
Requirements for user-defined custom images
In order for your custom image to be supported, it must:
Be publicly accessible; the integration will pull the image.
Use of user-defined custom images
Providing a custom image gives you more control over your environments. For example, unless you use custom images, you cannot able to use an environment with Node LTS.
How to create a custom image using Dockerfile
Given the base requirements, you can create a custom image to use Node LTS with the following Dockerfile:
The base image uses Alpine to keep things lightweight. You have installed Node and the Snyk CLI; this satisfies three-quarters of the requirements.
How to build and push the Docker image
As long as the pushed image is publicly accessible, you can use the SNYK_BASE_IMAGE
and LANGUAGE
variables to reference your custom image and tag, respectively, in your Bitbucket pipeline:
Last updated