[Proposal] Expose the container name in remoteEnv
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, docker-compose
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
This is a specification proposal, so there are no code files yet; the relevant text is the remoteEnv and variable-substitution sections of the devcontainer.json spec. Read the related issues linked in the body (spec #184 and #692) to see what has already been decided about container naming. Done means a written proposal that defines when ${containerName} is resolved, covers Docker Compose primary services, and is discussed by maintainers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A process running in a devcontainer may need its container’s runtime name for logging or tracking purposes. Today, there is no way to reference that name in remoteEnv. The name field in devcontainer.json is a display name and may differ from the name shown by Docker or Podman.
Add a ${containerName} variable that can be used in remoteEnv:
{
"remoteEnv": {
"DEVCONTAINER_CONTAINER_NAME": "${containerName}"
}
}
${containerName} should resolve to the actual runtime name of the primary development container. It should work for both newly created and reused containers, including the primary service in a Docker Compose setup. The tool should resolve it before running lifecycle commands or starting other processes to which remoteEnv applies.
This does not change how containers are named. Because the value is only known after container creation, ${containerName} would not be available in creation-time settings such as containerEnv or runArgs.
Related requests: container name in devcontainer.json (https://github.com/devcontainers/spec/issues/184) and a CLI option to choose the name (https://github.com/devcontainers/spec/issues/692).
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 5.8k
- Fork
- 503
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của devcontainers/spec
-
CLI sorts Feature options fewest-first, against specCó thể đã có người làm @nozaq đã nhận 86 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
devcontainers/spec#755 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
devcontainers/spec#754 · 1 bình luận · 2 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
devcontainers/spec#735 · 1 bình luận ·
-
Tighten lockfile specĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
devcontainers/spec#579 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
devcontainers/spec#777 ·
Tất cả issue của devcontainers/spec
Issue tương tự
-
Laptop display stays disabled after unplugging external monitor: FALLBACK output counted as externalĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[scanner] check-community-group-links rewrites report with fresh checkedAt when every upstream check failsCó thể đã có người làm @hivecommons-hive đã nhận hôm nay. Đang mởagent/scanner bug hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
semantic-reasoning/wirelog#2163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner friendly community contributions-welcome data-structures good first issue hacktoberfest help wanted up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Hermes: /ponytail off never reaches the model, the ruleset stays activeCó thể đã có người làm @szsunyuan đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DietrichGebert/ponytail#1121 ·
Maintainer thường phản hồi trong vòng 3 ngày