feat: add exec command for interactive container terminal access
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- docker, typescript
Direzione di ricerca
Inizia leggendo la struttura esistente dei comandi CLI e il flusso API indicato nell’issue: project.all, application.one e docker.getContainersByAppLabel. Esamina src/commands/exec.ts e le modifiche al README, quindi verifica le modalità interattiva e comando documentate per i tipi di servizio elencati. Il lavoro è completato quando il comando risolve il container in esecuzione previsto, mantiene l’input e l’output del terminale, esegue l’autenticazione con x-api-key ed è documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 152
- Fork
- 46
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Dokploy/cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·