Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Say why no container runtime was found

Đang mở
#1,571 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, node.js, typescript
Lĩnh vực
devtools

Hướng nghiên cứu

Start with getContainerRuntimeClient in packages/testcontainers/src/container-runtime/clients/client.ts, then read the strategies under packages/testcontainers/src/container-runtime/ to see how each reports failure. Coordinate with #1532 on the error class and cause handling. Done when the final error lists each attempted strategy and its reason, preserves underlying errors in cause, and links the supported runtimes page.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement minor

What happens

When no container runtime can be reached, the error is one line:

Could not find a working container runtime strategy

getContainerRuntimeClient tries five strategies in turn. The reason each one failed is logged at debug level and then discarded. The person who hits this, usually on first use or in a new CI environment, has to rerun with DEBUG=testcontainers* to learn whether the socket was missing, permission was denied or DOCKER_HOST pointed somewhere unreachable. Seven issues in this repo quote the message.

Expected

The error says what was tried and why each attempt failed, and points to the supported runtimes page:

Could not find a working container runtime. Tried:
- TestcontainersHostStrategy: tc.host is not set
- ConfigurationStrategy: DOCKER_HOST is not set
- UnixSocketStrategy: connect ENOENT /var/run/docker.sock
- RootlessUnixSocketStrategy: no socket at /run/user/1000/docker.sock
- NpipeSocketStrategy: not Windows
See https://node.testcontainers.org/supported-container-runtimes/

Where

getContainerRuntimeClient in packages/testcontainers/src/container-runtime/clients/client.ts, and the strategies in packages/testcontainers/src/container-runtime/strategies/.

Notes

  • Strategies currently signal "not applicable" by returning nothing, so each needs to return a reason.
  • The underlying errors belong in cause.

Dependencies

  • Nothing blocks this. It can start now.
  • Coordinate with #1532: for the error class and cause.
Ngôn ngữ chính
TypeScript
Star
2.6k
Fork
274
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của testcontainers/testcontainers-node

Tất cả issue của testcontainers/testcontainers-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.