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

Feature request: `@devcontainers/cli` as a docker CLI plugin

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

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
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
docker, shell, typescript
Lĩnh vực
cli, devops

Hướng nghiên cứu

Bắt đầu bằng cách xem xét các command entry point hiện có của @devcontainers/cli và các quy ước về Docker CLI plugin được tham chiếu trong issue. So sánh các dạng được yêu cầu docker devcontainer buildrun với các lệnh hiện tại devcontainer upexec, sau đó đọc các pull request và issue được liên kết. Hoàn tất yêu cầu có một thiết kế plugin đã được thống nhất, ánh xạ lệnh và phạm vi cho shell-completion.

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

Mô tả

feature-request

We've found it difficult to on-board users accustomed to the docker CLI to @devcontainers/cli.

It would be awesome if @devcontainers/cli were a docker CLI front-end plugin, similar to docker compose, docker buildx, etc.

Partially the motivation is similar to existing issues/PRs -- having a way to use the CLI without node would be great:

This would also hopefully provide incentive to better align with docker CLI idioms. For example:

  • The docker CLI has docker build, and Buildx/compose have docker buildx build and docker compose build.
  • The docker CLI has docker run, and compose has docker compose run.
  • etc.

For example, in the absence of devcontainer run <args>, we find ourselves writing scripts to wrap @devcontainers/cli and mimic the behavior:

local container_id rm up_args exec_args;

_parse_args_somehow rm up_args exec_args;

on_exit() {
    local code=$?;
    if test -n "${rm-}" && test -n "${container_id-}"; then
        docker rm -f "${container_id}" >/dev/null 2>&1 || true;
        container_id="";
    fi
    exit "${code}";
}

trap on_exit EXIT;

container_id="$(devcontainer up ${rm:+--remove-existing-container} "${up_args[@]}" | jq -r '.containerId')";

devcontainer exec --workspace-folder . --config <path> "${exec_args[@]}";

It would be really neat to type docker devcontainer build . or docker devcontainer run --rm -it ..., especially if the @devcontainers/cli plugin also shipped shell completions!

Ngôn ngữ chính
TypeScript
Star
3k
Fork
461
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 devcontainers/cli

Tất cả issue của devcontainers/cli

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.