feat: add exec command for interactive container terminal access
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- docker, typescript
調査の方向性
まず、既存のCLIコマンド構造と、issueで示されているAPIフローを読みます: project.all、application.one、docker.getContainersByAppLabel。src/commands/exec.tsとREADMEの変更を確認し、続いて一覧にあるサービス種別全体で、ドキュメント化されたインタラクティブモードとコマンドモードを検証します。コマンドが意図した実行中のコンテナを解決し、ターミナルの入力と出力を維持し、x-api-keyで認証し、ドキュメント化されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Add an exec command that allows users to open interactive terminal sessions in running Dokploy containers directly from the CLI — similar to heroku run.
Motivation
Currently, the only way to get terminal access to a running container is through the Dokploy web panel's Terminal tab. There's no CLI equivalent, which makes it difficult to:
- Run one-off commands like
rails c,python manage.py shell, or database migrations - Integrate with local development workflows and scripts
- Provide quick terminal access without opening a browser
This is a commonly expected feature for PaaS CLI tools (Heroku, Fly.io, Railway all support it).
Proposed solution
A new hand-authored command (src/commands/exec.ts) that:
- Resolves the service name to a running container via the existing Dokploy API (
project.all→application.one→docker.getContainersByAppLabel) - Connects via WebSocket to the
/docker-container-terminalendpoint (the same protocol the web panel uses) - Pipes raw stdin/stdout for an interactive terminal session
Usage
# Interactive shell
dokploy exec --app Web
# Run a command
dokploy exec --app Web rails c
# Disambiguate across projects/environments
dokploy exec --project "My Project" --env staging --app Web rails c
Supported service types
Works with all Dokploy service types: applications, redis, postgres, mongo, mysql, mariadb, and compose.
Authentication
Uses the existing x-api-key authentication — no SSH access to the server required. Teammates only need a Dokploy API key.
Implementation
I have a working implementation ready to submit as a PR. It adds:
src/commands/exec.ts— the new commandwsdependency — for WebSocket client- Updated README with usage docs
Happy to adjust the implementation based on feedback.
- 主要言語
- TypeScript
- スター
- 152
- フォーク
- 46
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Dokploy/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/tanstack.com#1293 ·