Feature request: `@devcontainers/cli` as a docker CLI plugin
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, shell, typescript
Research direction
Start by reviewing the existing @devcontainers/cli command entry points and the Docker CLI plugin conventions referenced in the issue. Compare the requested docker devcontainer build and run forms with the current devcontainer up and exec commands, then read the linked pull requests and issue. Done requires an agreed plugin design, command mapping, and shell-completion scope.
Written by the indexing model from the issue text.
Description
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:
- https://github.com/devcontainers/cli/pull/343
- https://github.com/devcontainers/cli/issues/614
- https://github.com/devcontainers/cli/pull/618
This would also hopefully provide incentive to better align with docker CLI idioms. For example:
- The docker CLI has
docker build, and Buildx/compose havedocker buildx buildanddocker compose build. - The docker CLI has
docker run, and compose hasdocker 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!
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 461
- Avg merge
- 18m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devcontainers/cli
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
devcontainers/cli#1203 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
devcontainers/cli#1178 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
devcontainers/cli#1308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
devcontainers/cli#1307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
devcontainers/cli#1305 ·
All issues in devcontainers/cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·