brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: the portainer console needs /bin/ash on Alpine, or a custom command

Portainer
~/tips/tip-portainer-console-alpine-ash-custom-command

docker exec -it -u root mycontainer /bin/ash

Opens a shell inside a container from the browser and explains the Alpine exception.

The console button is a graphical docker exec. It picks a shell for you, and that does not always exist in the image.

docker exec -it -u root mycontainer /bin/ash

Open the container, click Console, choose the command and the user and press Connect. For Alpine-based images select /bin/ash, because bash is not installed there. For anything else, switch on Use custom command and type your own.

The docker exec line above does the same from the host. Minimal images without any shell cannot be opened this way, and no menu choice will change that.

Further reading: Portainer docs: Access a container's console

More Portainer tips Choose Polling in a Portainer GitOps update when your Git host can't reach Portainer Put Portainer environments in groups and give users access to a whole group Portainer's Edge Agent checks in every 5 seconds, and you can change that docker run -d -p 9001:9001 --name portainer_agent --restart=always \ Deploy the container → Replace All Portainer tips (28) All topics

Link