> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-container/use-snyk-container/use-custom-base-image-recommendations/versioning-schema-for-custom-base-images.md).

# Versioning schemas for custom base images

How versioning schemas work for custom base image recommendations

You must set a versioning schema for the first Project you mark as a custom base image in the image's repository. You can edit the **Custom base Image settings** for Projects that you have already marked as custom base images. For more information, see [Mark the created Project as a custom base image](/scan-fix-and-prevent/scan-with-snyk/snyk-container/use-snyk-container/use-custom-base-image-recommendations.md#mark-the-created-project-as-a-custom-base-image).

You can manage the versioning schema for images imported to Projects for a repository in the Web UI or by using the API endpoint [Create a Custom Base Image from an existing container project](/developer-tools/snyk-api/reference/custom-base-images.md#custom_base_images).

Snyk recommends updating a custom base image to the latest available version from the pool of images imported as Projects, marked as custom base images, and enabled for recommendations. For more information, see [Enable CBIR](/scan-fix-and-prevent/scan-with-snyk/snyk-container/use-snyk-container/use-custom-base-image-recommendations.md#enable-cbir).

To determine which is the latest version, Snyk uses a versioning schema that allows comparing image tags.

Snyk supports the following versioning schemas.

## **Semantic Versioning (SemVer)**

This schema adheres to the [Semantic Versioning Specification](https://semver.org/) (SemVer).

In the below example, when Snyk scans the images and marks them as custom base images in the order shown, the SemVer logic is:

1. `somecompany/alpine-base:3.18.3`
2. `somecompany/alpine-base:3.19.0`
3. `somecompany/alpine-base:3.18.5`

Snyk recommends the second image, as it is the newest image based on the semantic versioning of the tag.

The following commonly used examples are not supported SemVer tags:

* `v1.2.3`
* `1.2`
* `latest`

## Single Selection

This versioning schema allows you to manually set a single image as a recommendation.

When selecting an image, any other previously selected images are automatically unselected.

## Custom versioning schema

If none of the above schemas match your requirements, you may create a custom versioning schema. For more information, see [Custom Versioning Schema for custom base images](/scan-fix-and-prevent/scan-with-snyk/snyk-container/use-snyk-container/use-custom-base-image-recommendations/custom-versioning-schema-for-custom-base-images.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-container/use-snyk-container/use-custom-base-image-recommendations/versioning-schema-for-custom-base-images.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
