Console

Look inside a running container, with no SSH.

A terminal inside a running container, through the agent on the server. Nothing to install, and you never need it to use Deplo.

The terminal itself, running inside the container over the agent

Two tabs:

  • Shell runs one docker exec per line. Each line is its own process, so cd does not carry over and interactive programs (top, vim, less, psql) do not work. Use it for ls, cat, env or a one-off script.
  • Attach connects to the main process (PID 1): you watch it live and type to its stdin, and Ctrl-C reaches the app. A container started without stdin open streams its output only.

Open a console

Turn the console on

For an app: Settings -> Advanced, turn on Console, confirm with Turn it on, then click Open console. The app's sidebar shows Console while it runs.

For a database there is no switch: Settings -> Advanced -> Open console.

Settings -> Advanced, where the console is switched on per app

Acknowledge the warning

The first time in a browser, Deplo asks Open the container console?. Click I understand. It is remembered in this browser only.

The confirmation Deplo asks for before attaching a shell to the container

Pick the container from the picker: each row has a running dot, the service name, and an app badge on the one your domains route to. The prompt reads user@service$.

The Shell select offers auto, /bin/sh and /bin/bash. The last two run each line through that shell, so pipes and redirects work. With auto on an image that has no shell (distroless or scratch), lines run as raw exec: the first word is the binary, the rest are literal arguments.

Good to know

  • Changes inside a container do not survive a redeploy. Keep them in a volume or in your repository.
  • open_app_console and open_database_console are separate, sensitive capabilities. A console runs any code as the container's user.
  • A stopped app has no container to enter.
  • An app with replicas asks which one to open. On a cluster the picker lists the copies on every server. See Console on a cluster.
  • This is not a way onto the host. Reaching the server itself needs host access.

Troubleshooting

SymptomWhat to check
No Console in the app's sidebarThe Console switch is off, the app is not running, or you lack open_app_console.
cd has no effect on the next commandExpected in Shell: every line is a separate exec. Chain with &&.
top or vim draws nothingSame reason. Use Attach on a container started with a TTY.
No shell in this containerA distroless or scratch image. Run a binary that exists in it.

More in Servers and agents.

Next steps

Did this page help you?

On this page