Console

Look inside a running container, with no SSH.

The console lets you look inside a running container. It goes through the agent on the server and is not required to use Deplo.

The terminal itself, running inside the container over the agent

There are two tabs:

  • Shell runs one docker exec per line you type. Each line is a separate process, so cd does not carry over to the next command, and interactive programs like top, vim, less or psql do not work. Use it for ls, cat, env or a one-off script.
  • Attach connects to the main process's input and output. This is a real terminal, but only works for a container started with a TTY and an open stdin.

Open a console

The console is hidden until you acknowledge it once.

Open the app's Advanced settings

Open the app, then Settings -> Advanced, and click Open console.

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

Acknowledge the warning

Read the warning and click I understand. From then on the sidebar shows a Console entry whenever a container is running. The acknowledgement is stored in this browser only, so another browser asks again.

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

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

The Shell select offers auto, /bin/sh, /bin/bash and raw exec with no shell. An image with no shell at all (distroless or scratch) says so. You can still run a binary that exists in it.

Good to know

  • Changes inside a container do not survive a redeploy. The container is recreated from the image. Keep changes in a volume or in your repository.
  • open_app_console and open_database_console are separate, sensitive capabilities. A console runs any code as that container's user.
  • The console needs something running. A stopped app has no container to enter.
  • This is not a way onto the host. You are inside a container. Reaching the server itself needs host access.

Troubleshooting

SymptomWhat to check
No Console entry in the sidebarThe acknowledgement has not been given in this browser, nothing is running, or you lack the capability.
cd has no effect on the next commandExpected in the Shell tab: every line is a separate docker exec. Chain commands on one line with &&.
top or vim draws nothingSame reason. Use Attach, and only on a container started with a TTY.
Raw exec, no shellA 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