Skip to content

ghcr.io/cross-rs/cross:main shows wrong version (without commit info) #1594

Open
@AndreyMZ

Description

Problem description

cross in the Docker image ghcr.io/cross-rs/cross:main shows wrong version (0.2.5, without commit info).

Impact

This version is used as the default version for build images:

pub const DEFAULT_IMAGE_VERSION: &str = if crate::commit_info().is_empty() {
env!("CARGO_PKG_VERSION")
} else {
"main"
};

So, outdated build images are used. For example, ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 is used instead of ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main.

Steps to reproduce

docker pull ghcr.io/cross-rs/cross:main
docker run -it ghcr.io/cross-rs/cross:edge cross --version

Actual result

$ docker run -it ghcr.io/cross-rs/cross:edge cross --version
cross 0.2.5

Expected result

$ docker run -it ghcr.io/cross-rs/cross:edge cross --version
cross 0.2.5 (4090bec 2024-10-15)

Workaround

Configure build images explicitly for every target:

  • in "Cargo.toml":
    [package.metadata.cross.target.x86_64-unknown-linux-gnu]
    image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
  • or using environment variables:
    CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE=ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions