Skip to content

Simplify Docker Compose naming to v2-only format#1238

Merged
cristianrgreco merged 1 commit intomainfrom
codex/compose-v2-name-simplification
Feb 17, 2026
Merged

Simplify Docker Compose naming to v2-only format#1238
cristianrgreco merged 1 commit intomainfrom
codex/compose-v2-name-simplification

Conversation

@cristianrgreco
Copy link
Collaborator

Summary

  • Remove Compose v1-style project-prefix parsing and keep Compose v2 naming plus explicit container_name support.
  • Simplify compose docs to document only the current <service-name>-<index> naming format.
  • Rename compose fixture services from numeric names to service-a and service-b for clarity.
  • Inline literal Compose v2 container names in compose tests and remove the unused composeContainerName helper.

Verification

  • npm run format
  • npm run lint
  • npm test -- packages/testcontainers/src/container-runtime/clients/compose/parse-compose-container-name.test.ts packages/testcontainers/src/docker-compose-environment/docker-compose-environment.test.ts

Test Results

  • 27 tests passed across 2 test files.

Semver Impact

  • patch
  • The change is not breaking: public APIs are unchanged and only unsupported Compose v1 naming compatibility code was removed.

Closes #840

@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit ae294fe
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/699494cdde2c5c0008370e87
😎 Deploy Preview https://deploy-preview-1238--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cristianrgreco cristianrgreco added maintenance Improvements that do not change functionality patch Backward compatible bug fix labels Feb 17, 2026
@cristianrgreco cristianrgreco merged commit 5dc5293 into main Feb 17, 2026
340 checks passed
@cristianrgreco cristianrgreco deleted the codex/compose-v2-name-simplification branch February 17, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting COMPOSE_COMPATIBILITY flag changes behavior of separators and break Compose v2 integration

1 participant

Comments