PORTAINER
How to control Docker over the internet
Nick Peers discovers a user-friendly, convenient and powerful way to administer your Docker containers from wherever you happen to be.
OUR EXPERT
Nick Peers uses Portainer to manage Docker on his Ubuntu server. He bloody loves it, he does.
MONITOR YOUR CONTAINERS
1 Navigation sidebar
Use this to quickly move between the different parts of your currently selected Docker instance, and tweak Portainer settings.
2 Container controls
Select one or more containers, then perform bulk actions: start, stop, kill or restart, pause/resume, or even remove.
3 Container list
View a summary of all containers you’ve set up under the current Docker instance. Sort the list using the column headers.
4 Quick actions
Provides handy shortcuts to logs, inspection details, stats and a command prompt (exec console) – just click the appropriate button.
5 Add container
Click this to create a new container following the step-by-step guide over the page.
6 Customise view
Choose what information (Columns) and quick actions (Settings) are shown on the Container list.
D
ocker is a fantastic tool, enabling you to run all kinds of applications, tools and services in selfcontained spaces without the need for a fullblown virtual machine. But controlling it from the command line can be tricky. The obvious solution when running Docker on a desktop is to pair it with Docker Compose, the official GUI frontend, but what if you don’t like Docker Compose, or you’re running Docker on a server with no desktop?
The answer lies in Portainer (www.portainer.io) – aweb-based frontend you can use to control Docker from any PC on your local network – or even further afield if you pair it with a reverse proxy. Portainer’s user-friendly interface is packed with powerful features to make it a worthy alternative to Docker Compose. It can be used to manage all the instances of Docker across your network from one central place, and also works with Docker Swarm, Kubernetes and Nomad. Portainer comes in both free and paid-for editions – we’ll be focssing on the free Community Edition version in this tutorial.
Installing Portainer
We’re assuming you already have a form of Docker installed on your machine – see https://docs.docker. com/engine/install/ubuntu for details of installing it in Ubuntu if not. Portainer ships as a Docker instance – it can be run as part of a Docker Swarm or in Kubernetes (see https://docs.portainer.io/v/ce-2.11/start/installfor details), but for the purposes of this tutorial, we’ll focus on running it with a local instance of Docker.
To do this, issue these commands in the Terminal, which assume you’ve either added your username to the docker group or configured for rootless access. If not, prefix the commands using sudo .