Skip to content

Cannot range over 10 in v29.3.0+incompatible #6852

Description

@stevenh

Description

When trying to us: v29.3.0+incompatible we get a compile issues

cannot range over 10 (untyped int constant): requires go1.22 or later (-lang was set to go1.16; check go.mod)

This is caused by not using go.mod (incompatible) mode which pins the version to go 1.16.

Reproduce

  1. update to v29.3.0+incompatible
  2. Try to compile a packate

Expected behavior

compiles

docker version

N/A

docker info

N/A

Additional Info

Also conflicts with docker/buildx pulled in by compose v2.40.3

Activity

  1. thaJeztah commented on Mar 10, 2026

    @thaJeztah
    Member

    Thanks for reporting; I opened a fix in #6854

    Also conflicts with docker/buildx pulled in by compose v2.40.3

    The compose v2 module is EOL, and should no longer be imported; if you're using it, you should import the "v5" module and update import paths to github.com/docker/compose/v5.

  2. stevenh commented on Mar 10, 2026

    @stevenh
    Author

    Thanks @thaJeztah compose is a transitive dependency from https://pkg.go.dev/github.com/testcontainers/testcontainers-go/modules/compose I'll look to get that updated but last time I tried there were conflicts with other docker dependencies which hadn't updated to the moby client imports yet which blocked that update.

  3. thaJeztah commented on Mar 10, 2026

    @thaJeztah
    Member

    Ah, right! Yes, testcontainers-go still needs to be migrated to use the moby modules. We're in a bit of a transitional state, where there's still too much functionality living in docker/cli (which isn't a Go module yet), but the github.com/docker/docker package having migrated to modules (github.com/moby/moby/api, github.com/moby/moby/client).

  4. thaJeztah commented on Mar 10, 2026

    @thaJeztah
    Member

    ISTR I started a branch for testcontainers-go, but it wasn't complete yet; let me dig that branch up 😂

  5. stevenh commented on Mar 10, 2026

    @stevenh
    Author

    Thanks @thaJeztah send me the details of the branch and I'll have a look when I get some spare time as I'm one of the testcontainers-go maintainers, in case you weren't aware 😄
    @mdelapenya for visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions