migetpacks automatically detects the language version for your project by checking environment variables, version files, and project configuration files in a defined priority order. If no version is found, a sensible default is used.

Detection Priority by Language

Each language checks sources in the order listed below. The first match wins.

Node.js

Bun

Deno

Ruby

Python

Go

Rust

PHP

Java

Kotlin

Scala

Clojure

.NET

Elixir

Version Normalization

migetpacks normalizes version constraints found in project files to Docker-compatible image tags. The following transformations are applied:

Prefix Removal

The v prefix is stripped from versions:

Semver Range Operators

Operators like >=, ^, ~, >, <, and = are removed, and the base version is extracted:
For full semver versions with operators, the patch version is dropped:

Wildcard Patterns

The .x and .* patterns are reduced to the major version:

OR Alternatives

When a version string contains || separated alternatives, the highest major version is selected:

Plain Versions

Explicit versions without operators are kept as-is, since Docker Hub has tags for all common formats: